mirror of
https://github.com/coreutils/coreutils.git
synced 2024-12-02 22:44:44 +08:00
maint: suppress GCC 13 false alarms
* src/csplit.c, src/fmt.c, src/make-prime-list.c, src/nohup.c: Add pragmas to pacify GCC 13 when coreutils is configured with --enable-gcc-warnings='expensive'.
This commit is contained in:
parent
6c199713ed
commit
21e7573508
@ -382,6 +382,13 @@ record_line_starts (struct buffer_record *b)
|
||||
return lines;
|
||||
}
|
||||
|
||||
/* Work around <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109614>. */
|
||||
#if 13 <= __GNUC__
|
||||
# pragma GCC diagnostic ignored "-Wanalyzer-mismatching-deallocation"
|
||||
# pragma GCC diagnostic ignored "-Wanalyzer-use-after-free"
|
||||
# pragma GCC diagnostic ignored "-Wanalyzer-use-of-uninitialized-value"
|
||||
#endif
|
||||
|
||||
static void
|
||||
free_buffer (struct buffer_record *buf)
|
||||
{
|
||||
|
@ -915,6 +915,11 @@ fmt_paragraph (void)
|
||||
word_limit->length = saved_length;
|
||||
}
|
||||
|
||||
/* Work around <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109628>. */
|
||||
#if 13 <= __GNUC__
|
||||
# pragma GCC diagnostic ignored "-Wanalyzer-use-of-uninitialized-value"
|
||||
#endif
|
||||
|
||||
/* Return the constant component of the cost of breaking before the
|
||||
word THIS. */
|
||||
|
||||
|
@ -110,6 +110,11 @@ print_wide_uint (wide_uint n, int nesting, unsigned wide_uint_bits)
|
||||
printf ("0x%0*xU", hex_digits_per_literal, remainder);
|
||||
}
|
||||
|
||||
/* Work around <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109635>. */
|
||||
#if 13 <= __GNUC__
|
||||
# pragma GCC diagnostic ignored "-Wanalyzer-use-of-uninitialized-value"
|
||||
#endif
|
||||
|
||||
static void
|
||||
output_primes (const struct prime *primes, unsigned nprimes)
|
||||
{
|
||||
|
@ -73,6 +73,11 @@ To save output to FILE, use '%s COMMAND > FILE'.\n"),
|
||||
exit (status);
|
||||
}
|
||||
|
||||
/* GCC 13 gets confused by the dup2 calls. */
|
||||
#if 13 <= __GNUC__
|
||||
# pragma GCC diagnostic ignored "-Wanalyzer-fd-leak"
|
||||
#endif
|
||||
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user