]> git.ipfire.org Git - thirdparty/coreutils.git/commit
maint: avoid -Werror=strict-overflow warnings with GCC 5
authorPádraig Brady <P@draigBrady.com>
Wed, 22 Apr 2015 00:07:01 +0000 (01:07 +0100)
committerPádraig Brady <P@draigBrady.com>
Wed, 22 Apr 2015 10:11:19 +0000 (11:11 +0100)
commit8878c4ef1b88fd07a48ccd7df6bff7ba0929dad7
treef427316aa66d271bfc031d1701629d5e2a69a212
parent01f4065b129c6ad55eef765e701d0e20342867c7
maint: avoid -Werror=strict-overflow warnings with GCC 5

All warnings were of the form: "assuming signed overflow does not occur
when simplifying conditional to constant [-Werror=strict-overflow]"

* src/dd.c (cache_round): Use an appropriately sized unsigned type,
to avoid possibility of undefined signed overflow.
* src/mknod.c (main): Likewise.
* src/pr.c (pad_down): Likewise.
* src/wc.c (main): Likewise.
* src/tail.c (main): Assert that argc >= 0 thus allowing the
compiler to assume without implication that argc - optind
is positive.
src/dd.c
src/mknod.c
src/pr.c
src/tail.c
src/wc.c