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.
This commit is contained in:
Paul Eggert committed 2023-07-01 11:51:16 -07:00
1 parent d438486cb5
commit 17aaba6a41
2 files changed
+2 -4

No files matched your search

+1 -2
View File
@@ -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);
+1 -2
View File
@@ -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);