Ignore:
Timestamp:
Apr 23, 2019, 2:41:32 PM (5 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
673cd63
Parents:
8c3a0336
Message:

Fixed several warnings in libcfa

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/time.hfa

    r8c3a0336 rffe2fad  
    3030
    3131static inline {
    32         Duration ?=?( Duration & dur, zero_t ) { return dur{ 0 }; }
     32        Duration ?=?( Duration & dur, __attribute__((unused)) zero_t ) { return dur{ 0 }; }
    3333
    3434        Duration +?( Duration rhs ) with( rhs ) {       return (Duration)@{ +tv }; }
     
    5959        bool ?>=?( Duration lhs, Duration rhs ) { return lhs.tv >= rhs.tv; }
    6060
    61         bool ?==?( Duration lhs, zero_t ) { return lhs.tv == 0; }
    62         bool ?!=?( Duration lhs, zero_t ) { return lhs.tv != 0; }
    63         bool ?<? ( Duration lhs, zero_t ) { return lhs.tv <  0; }
    64         bool ?<=?( Duration lhs, zero_t ) { return lhs.tv <= 0; }
    65         bool ?>? ( Duration lhs, zero_t ) { return lhs.tv >  0; }
    66         bool ?>=?( Duration lhs, zero_t ) { return lhs.tv >= 0; }
     61        bool ?==?( Duration lhs, __attribute__((unused)) zero_t ) { return lhs.tv == 0; }
     62        bool ?!=?( Duration lhs, __attribute__((unused)) zero_t ) { return lhs.tv != 0; }
     63        bool ?<? ( Duration lhs, __attribute__((unused)) zero_t ) { return lhs.tv <  0; }
     64        bool ?<=?( Duration lhs, __attribute__((unused)) zero_t ) { return lhs.tv <= 0; }
     65        bool ?>? ( Duration lhs, __attribute__((unused)) zero_t ) { return lhs.tv >  0; }
     66        bool ?>=?( Duration lhs, __attribute__((unused)) zero_t ) { return lhs.tv >= 0; }
    6767
    6868        Duration abs( Duration rhs ) { return rhs.tv >= 0 ? rhs : -rhs; }
     
    101101        void ?{}( timeval & t, time_t sec, suseconds_t usec ) { t.tv_sec = sec; t.tv_usec = usec; }
    102102        void ?{}( timeval & t, time_t sec ) { t{ sec, 0 }; }
    103         void ?{}( timeval & t, zero_t ) { t{ 0, 0 }; }
    104 
    105         timeval ?=?( timeval & t, zero_t ) { return t{ 0 }; }
     103        void ?{}( timeval & t, __attribute__((unused)) zero_t ) { t{ 0, 0 }; }
     104
     105        timeval ?=?( timeval & t, __attribute__((unused)) zero_t ) { return t{ 0 }; }
    106106        timeval ?+?( timeval lhs, timeval rhs ) { return (timeval)@{ lhs.tv_sec + rhs.tv_sec, lhs.tv_usec + rhs.tv_usec }; }
    107107        timeval ?-?( timeval lhs, timeval rhs ) { return (timeval)@{ lhs.tv_sec - rhs.tv_sec, lhs.tv_usec - rhs.tv_usec }; }
     
    116116        void ?{}( timespec & t, time_t sec, __syscall_slong_t nsec ) { t.tv_sec = sec; t.tv_nsec = nsec; }
    117117        void ?{}( timespec & t, time_t sec ) { t{ sec, 0}; }
    118         void ?{}( timespec & t, zero_t ) { t{ 0, 0 }; }
    119 
    120         timespec ?=?( timespec & t, zero_t ) { return t{ 0 }; }
     118        void ?{}( timespec & t, __attribute__((unused)) zero_t ) { t{ 0, 0 }; }
     119
     120        timespec ?=?( timespec & t, __attribute__((unused)) zero_t ) { return t{ 0 }; }
    121121        timespec ?+?( timespec lhs, timespec rhs ) { return (timespec)@{ lhs.tv_sec + rhs.tv_sec, lhs.tv_nsec + rhs.tv_nsec }; }
    122122        timespec ?-?( timespec lhs, timespec rhs ) { return (timespec)@{ lhs.tv_sec - rhs.tv_sec, lhs.tv_nsec - rhs.tv_nsec }; }
     
    145145void ?{}( Time & time, int year, int month = 0, int day = 0, int hour = 0, int min = 0, int sec = 0, int nsec = 0 );
    146146static inline {
    147         Time ?=?( Time & time, zero_t ) { return time{ 0 }; }
     147        Time ?=?( Time & time, __attribute__((unused)) zero_t ) { return time{ 0 }; }
    148148
    149149        void ?{}( Time & time, timeval t ) with( time ) { tv = (int64_t)t.tv_sec * TIMEGRAN + t.tv_usec * 1000; }
Note: See TracChangeset for help on using the changeset viewer.