]> git.ipfire.org Git - thirdparty/coreutils.git/commit
build: avoid -Wstrict-overflow warnings with GCC 5.1 on 32 bit
authorPádraig Brady <P@draigBrady.com>
Fri, 2 Oct 2015 19:28:37 +0000 (20:28 +0100)
committerPádraig Brady <P@draigBrady.com>
Sat, 3 Oct 2015 01:54:51 +0000 (02:54 +0100)
commit00ac17889345fe48f6fa4eb2e9457319199e0fe2
tree737279b404ea6aee773a2a5ea5578b59e01ca3a0
parent8fe6f70f35ced8ee52c60f1c9f78fb418d723581
build: avoid -Wstrict-overflow warnings with GCC 5.1 on 32 bit

* src/shred.c (dopass): With -O2, GCC 5.1 gives "assuming signed
overflow does not occur when simplifying conditional to constant"
warnings, in regard to the signed (off_t) variables.  Therefore
use unsigned (uintmax_t) instead, and a separate boolean to cater
for the special meaning of the negative part of the integer range.
Noticed at http://hydra.nixos.org/build/24983447
src/shred.c