]> git.ipfire.org Git - thirdparty/coreutils.git/commit
maint: accommodate gcc's -Wstrict-overflow option
authorJim Meyering <meyering@redhat.com>
Wed, 25 May 2011 10:29:18 +0000 (12:29 +0200)
committerJim Meyering <meyering@redhat.com>
Thu, 26 May 2011 20:13:37 +0000 (22:13 +0200)
commit419b6c9d42ba643265f802cd150d0b232e43186a
tree993d42ce541942f5863de308c98ff773cf29ab32
parentd7e23652039b5e145ab0d809a7de75ebb3facc24
maint: accommodate gcc's -Wstrict-overflow option

* src/factor.c (factor_using_pollard_rho): Change type of "i"
to unsigned to avoid warning from gcc's -Wstrict-overflow.
* src/expr.c: Use an unsigned intermediate.
* src/dircolors.c (main): Reorder operations to avoid the risk of
pointer overflow.
* src/tr.c (squeeze_filter): Change NOT_A_CHAR from an anonymous
"enum" to an "int", to avoid this warning:
tr.c:1624:10: error: assuming signed overflow does not occur when
  simplifying conditional to constant [-Werror=strict-overflow]
* src/pr.c (main): Make index "i" unsigned.
src/dircolors.c
src/expr.c
src/factor.c
src/pr.c
src/tr.c