Skip to content

Fix Wsign-compare warnings in EventBuilding

Rosen Matev requested to merge rm-fix-warnings into master

Fix Wsign-compare warnings in EventBuilding in the nightlies

../../../Online/EventBuilding/src/tools.cpp: In function 'timespec EB::timespec_diff(timespec, timespec)':
../../../Online/EventBuilding/src/tools.cpp:22:33: warning: comparison of integer expressions of different signedness: '__syscall_slong_t' {aka 'long int'} and 'long unsigned int' [-Wsign-compare]
   22 |   if (lhs.tv_nsec - rhs.tv_nsec > 1000000000UL) {
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
../../../Online/EventBuilding/src/tools.cpp: In function 'timespec EB::timespec_plus(timespec, timespec)':
../../../Online/EventBuilding/src/tools.cpp:38:33: warning: comparison of integer expressions of different signedness: '__syscall_slong_t' {aka 'long int'} and 'long unsigned int' [-Wsign-compare]
   38 |   if (lhs.tv_nsec + rhs.tv_nsec > 1000000000UL) {
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~

/cc @flpisani @frankm

Merge request reports