]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
maint: pr: avoid new GCC 7 warning
authorJim Meyering <meyering@fb.com>
Wed, 14 Sep 2016 18:48:33 +0000 (11:48 -0700)
committerJim Meyering <meyering@fb.com>
Sat, 15 Oct 2016 15:41:42 +0000 (08:41 -0700)
* src/pr.c (main): Avoid this warning from GCC 7:
src/pr.c:1119:6: error: assuming signed overflow does not occur when \
  simplifying conditional to constant [-Werror=strict-overflow]
   if (n_files == 0)

src/pr.c

index d4549a3bbf4c4ab7c2de2ad2de95f857c74d1fd0..a22d550a7feb161a64ca1fac529db9e37daddd3d 100644 (file)
--- a/src/pr.c
+++ b/src/pr.c
@@ -847,7 +847,7 @@ separator_string (const char *optarg_S)
 int
 main (int argc, char **argv)
 {
-  int n_files;
+  unsigned int n_files;
   bool old_options = false;
   bool old_w = false;
   bool old_s = false;