From: Nick Mathewson Date: Thu, 21 Aug 2014 14:44:13 +0000 (-0400) Subject: Suppress coverity warning about overflowing in safe_mem_is_zero X-Git-Tag: tor-0.2.6.1-alpha~189^2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=917e1042f75e9db2836def41210fa756c8ca3a85;p=thirdparty%2Ftor.git Suppress coverity warning about overflowing in safe_mem_is_zero The unsigned underflow here is defined and intentional. CID 202482 --- diff --git a/src/common/di_ops.c b/src/common/di_ops.c index f03b2b75ec..a8bfd02532 100644 --- a/src/common/di_ops.c +++ b/src/common/di_ops.c @@ -218,6 +218,7 @@ safe_mem_is_zero(const void *mem, size_t sz) total |= *ptr++; } + /*coverity[overflow]*/ return 1 & ((total - 1) >> 8); }