From: Paul Eggert Date: Sat, 1 Jul 2023 18:31:40 +0000 (-0700) Subject: maint: pacify GCC bug#109613 better X-Git-Tag: v9.4~91 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=17aaba6a41608a3f07e04f3e337a3195035c31a3;p=thirdparty%2Fcoreutils.git maint: pacify GCC bug#109613 better * src/cut.c (cut_file): * src/nl.c (nl_file): Pacify GCC Bug#109613 in a better way, by narrowing the coverage of the ‘assume’ so that bugs in the no-longer-covered part are not masked. --- diff --git a/src/cut.c b/src/cut.c index 48ac012805..12dfd2299f 100644 --- a/src/cut.c +++ b/src/cut.c @@ -421,6 +421,7 @@ cut_file (char const *file, void (*cut_stream) (FILE *)) { have_read_stdin = true; stream = stdin; + assume (stream); /* Pacify GCC bug#109613. */ } else { @@ -432,8 +433,6 @@ cut_file (char const *file, void (*cut_stream) (FILE *)) } } - assume (stream); - fadvise (stream, FADVISE_SEQUENTIAL); cut_stream (stream); diff --git a/src/nl.c b/src/nl.c index 3c5a90b564..7b9b369807 100644 --- a/src/nl.c +++ b/src/nl.c @@ -440,6 +440,7 @@ nl_file (char const *file) { have_read_stdin = true; stream = stdin; + assume (stream); /* Pacify GCC bug#109613. */ } else { @@ -451,8 +452,6 @@ nl_file (char const *file) } } - assume (stream); - fadvise (stream, FADVISE_SEQUENTIAL); process_file (stream);