Fix 32bit sign comparisons
authorChristian Göttsche <cgzones@googlemail.com>
Mon, 4 Jan 2021 15:06:43 +0000 (16:06 +0100)
committerNoah Meyerhans <noahm@debian.org>
Sun, 10 Mar 2024 06:31:22 +0000 (22:31 -0800)
sieve-binary.c: In function 'sieve_binary_get_resource_usage':
sieve-binary.c:199:54: warning: comparison of integer expressions of different signedness: 'time_t' {aka 'long int'} and 'unsigned int' [-Wsign-compare]
  199 |  if (update_time != 0 && (ioloop_time - update_time) > timeout)
      |                                                      ^

Gbp-Pq: Name Fix-32bit-sign-comparisons.patch

pigeonhole/src/lib-sieve/sieve-binary.c

index 06cf5987fef9117891aeda821b9e03e062a73c1c..c971921ff691b870f39ecf35605f7c5973bc4a2d 100644 (file)
@@ -196,7 +196,7 @@ void sieve_binary_get_resource_usage(struct sieve_binary *sbin,
        time_t update_time = header->resource_usage.update_time;
        unsigned int timeout = sbin->svinst->resource_usage_timeout_secs;
 
-       if (update_time != 0 && (ioloop_time - update_time) > timeout)
+       if (update_time != 0 && (ioloop_time - update_time) > (time_t)timeout)
                i_zero(&header->resource_usage);
 
        sieve_resource_usage_init(rusage_r);