diff options
author | Jim Meyering <meyering@fb.com> | 2022-12-11 09:28:57 -0800 |
---|---|---|
committer | Jim Meyering <meyering@fb.com> | 2022-12-30 13:32:57 -0800 |
commit | eb3085a076c94cc4b48233ce8fa9de60bd734467 (patch) | |
tree | 4e2bd0a224a6284d9d83722a685a2a1797182a4e | |
parent | 4e9063a17b272922d1adb9abf5e3e6e2f01d02fe (diff) | |
download | diffutils-eb3085a076c94cc4b48233ce8fa9de60bd734467.tar.gz |
build: temp?-disable -Wanalyzer-use-of-uninitialized-value
* src/util.c (print_message_queue): This function triggers false
positive warnings from GCC12, so add pragmas to ignore that new warning
in this one function. Required when using either of these:
- gcc version 12.2.1 20221121
- gcc version 13.0.0 20221229 (experimental)
-rw-r--r-- | src/util.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -153,6 +153,13 @@ message (char const *format_msgid, ...) va_end (ap); } +/* Suppress false positive from gcc version 13.0.0 20221208 (experimental) (GCC) + */ +_Pragma ("GCC diagnostic push") +#if 12 <= __GNUC__ +_Pragma ("GCC diagnostic ignored \"-Wanalyzer-use-of-uninitialized-value\"") +#endif + /* Output all the messages that were saved up by calls to 'message'. */ void @@ -178,7 +185,8 @@ print_message_queue (void) m = next; } } - +_Pragma ("GCC diagnostic pop") + /* Signal handling, needed for restoring default colors. */ static void |