]> git.ipfire.org Git - thirdparty/coreutils.git/commit
ptx: avoid new warning/error from upcoming gcc-7.x
authorJim Meyering <meyering@fb.com>
Mon, 29 Aug 2016 05:53:50 +0000 (22:53 -0700)
committerJim Meyering <meyering@fb.com>
Mon, 29 Aug 2016 15:37:08 +0000 (08:37 -0700)
commitd591776d81c547ef9a24b95fc88698593d81d5e7
tree4a35ec73ec94e204427e57ff6cbf82faca78ac6c
parentbd75118c16d8bca235b61dbb99326c043278a791
ptx: avoid new warning/error from upcoming gcc-7.x

* src/ptx.c (fix_output_parameters): Switch to an unsigned type that
matches the OCCURS.file_index type. This avoids the following error
from gcc-7.0.0 20160829 (experimental):
  src/ptx.c:1220:14: error: assuming signed overflow does not occur \
    when simplifying conditional to constant [-Werror=strict-overflow]
          if (file_index > 0)
src/ptx.c