* [committed] libstdc++: Fix test failure due to -Wnonnull warnings
@ 2020-03-12 11:03 Jonathan Wakely
0 siblings, 0 replies; only message in thread
From: Jonathan Wakely @ 2020-03-12 11:03 UTC (permalink / raw)
To: libstdc++, gcc-patches
[-- Attachment #1: Type: text/plain, Size: 314 bytes --]
This test fails in the Fedora RPM build (but not elsewhere, for unknown
reasons). The warning is correct, we're passing a null pointer.
* testsuite/tr1/8_c_compatibility/cstdlib/functions.cc: Do not pass
a null pointer to functions with nonnull(1) attribute.
Tested x86_64-linux, committed to master.
[-- Attachment #2: patch.txt --]
[-- Type: text/plain, Size: 1016 bytes --]
commit fcc443b97e19d9c8a2d8ccdfa4cc20682165827e
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Thu Mar 12 11:03:04 2020 +0000
libstdc++: Fix test failure due to -Wnonnull warnings
This test fails in the Fedora RPM build (but not elsewhere, for unknown
reasons). The warning is correct, we're passing a null pointer.
* testsuite/tr1/8_c_compatibility/cstdlib/functions.cc: Do not pass
a null pointer to functions with nonnull(1) attribute.
diff --git a/libstdc++-v3/testsuite/tr1/8_c_compatibility/cstdlib/functions.cc b/libstdc++-v3/testsuite/tr1/8_c_compatibility/cstdlib/functions.cc
index 89c078ffe6f..227a7580bcf 100644
--- a/libstdc++-v3/testsuite/tr1/8_c_compatibility/cstdlib/functions.cc
+++ b/libstdc++-v3/testsuite/tr1/8_c_compatibility/cstdlib/functions.cc
@@ -30,7 +30,7 @@ void test01()
#if _GLIBCXX_USE_C99_STDLIB
long long i = 0;
- const char* s = 0;
+ const char* s = "";
char** endptr = 0;
int base = 0;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-03-12 11:03 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-12 11:03 [committed] libstdc++: Fix test failure due to -Wnonnull warnings Jonathan Wakely
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).