1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-08-18 01:18:51 +02:00

maint: avoid warning on older GCC compilers

* src/shuf.c: Avoid -Werror=maybe-uninitialized on GCC 10.2.1 at least.
This issue does seem to be addressed on GCC 12.
This commit is contained in:
Pádraig Brady
2024-08-04 11:45:34 +01:00
parent 1bb31793c2
commit e397d3f1d3
+4 -1
View File
@@ -509,7 +509,10 @@ main (int argc, char **argv)
line = operand;
}
else if (input_range)
line = nullptr;
{
IF_LINT (n_lines = hi_input - lo_input + 1); /* Avoid GCC 10 warning. */
line = nullptr;
}
else
{
/* If an input file is specified, re-open it as stdin. */