• KOBAYASHI Shuji's avatar
    Silence Clang warning with `MRB_INT64` and `MRB_32BIT` in `time.c` · ea1911d2
    KOBAYASHI Shuji authored
    Silence the following warnings:
    
      ```
      /mruby/mrbgems/mruby-time/src/time.c:871:15: warning: result of comparison of constant 9223372036854775807 with expression of type 'time_t' (aka 'long') is always false [-Wtautological-constant-out-of-range-compare]
        if (tm->sec > MRB_INT_MAX || tm->sec < MRB_INT_MIN) {
            ~~~~~~~ ^ ~~~~~~~~~~~
      /mruby/mrbgems/mruby-time/src/time.c:871:40: warning: result of comparison of constant -9223372036854775808 with expression of type 'time_t' (aka 'long') is always false [-Wtautological-constant-out-of-range-compare]
        if (tm->sec > MRB_INT_MAX || tm->sec < MRB_INT_MIN) {
                                     ~~~~~~~ ^ ~~~~~~~~~~~
      /mruby/mrbgems/mruby-time/src/time.c:887:16: warning: result of comparison of constant 9223372036854775807 with expression of type 'time_t' (aka 'long') is always false [-Wtautological-constant-out-of-range-compare]
        if (tm->usec > MRB_INT_MAX || tm->usec < MRB_INT_MIN) {
            ~~~~~~~~ ^ ~~~~~~~~~~~
      /mruby/mrbgems/mruby-time/src/time.c:887:42: warning: result of comparison of constant -9223372036854775808 with expression of type 'time_t' (aka 'long') is always false [-Wtautological-constant-out-of-range-compare]
        if (tm->usec > MRB_INT_MAX || tm->usec < MRB_INT_MIN) {
                                    ~~~~~~~~ ^ ~~~~~~~~~~~
      ```
    ea1911d2
time.c 28.1 KB