]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
maint: avoid false positive warning with newer gcc
authorPádraig Brady <P@draigBrady.com>
Sun, 17 Dec 2023 17:13:31 +0000 (17:13 +0000)
committerPádraig Brady <P@draigBrady.com>
Sun, 17 Dec 2023 17:19:29 +0000 (17:19 +0000)
* src/pr.c (read_line): GCC 13.2.1 can't discern that CHARS
is not used with '\n', so avoid the -Werror=maybe-uninitialized
issue in dev builds.

src/pr.c

index c9ffa2c754603a949074ee87c2200ca8e1595cbc..bc701269d224e6cd72bffb25037f8d2481530a28 100644 (file)
--- a/src/pr.c
+++ b/src/pr.c
@@ -2425,7 +2425,7 @@ static bool
 read_line (COLUMN *p)
 {
   int c;
-  int chars;
+  int chars IF_LINT (= 0);
   int last_input_position;
   int j, k;
   COLUMN *q;