__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>
/* now >= failed_time + name_request_retry_delay, meaning the
* period of not sending name request is over.
*/
- if (now.tv_sec >= device->name_resolve_failed_time +
- btd_opts.name_request_retry_delay)
+ if (now.tv_sec >= (time_t)(device->name_resolve_failed_time +
+ btd_opts.name_request_retry_delay))
return true;
return false;