core: Fix signed vs unsigned compare
authorBrian Gix <brian.gix@intel.com>
Wed, 29 Jun 2022 21:16:40 +0000 (14:16 -0700)
committerAyush Garg <ayush.garg@samsung.com>
Mon, 15 May 2023 09:25:54 +0000 (14:55 +0530)
commit57476e46c7e7e4833456cd284d4d9d4b2686477e
tree95441ecf76c725ce55f12dc345f4c08b33b72eae
parent05dcd1348e3f5f300181ea645951916f7dfebbc7
core: Fix signed vs unsigned compare

__time_t is not a portable data type, and can cause sign mismatch on
some compares.

Fixes:
  CC       src/bluetoothd-device.o
src/device.c: In function ‘device_is_name_resolve_allowed’:
src/device.c:4092:17: error: comparison of integer expressions of
different signedness: ‘__time_t’ {aka ‘long int’} and
‘long unsigned int’ [-Werror=sign-compare]
  if (now.tv_sec >= device->name_resolve_failed_time +
                 ^~
cc1: all warnings being treated as errors

Signed-off-by: Manika Shrivastava <manika.sh@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
src/device.c