summaryrefslogtreecommitdiff
path: root/libstdc++-v3
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2020-03-12 11:03:04 +0000
committerJonathan Wakely <jwakely@redhat.com>2020-03-12 11:03:04 +0000
commitfcc443b97e19d9c8a2d8ccdfa4cc20682165827e (patch)
treec39ea65bd5f7c6121af9b2c725837e43717c3dc5 /libstdc++-v3
parent54f46d82f54ba7a4110cef102b7c18eaf8b4b6bd (diff)
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.
Diffstat (limited to 'libstdc++-v3')
-rw-r--r--libstdc++-v3/ChangeLog5
-rw-r--r--libstdc++-v3/testsuite/tr1/8_c_compatibility/cstdlib/functions.cc2
2 files changed, 6 insertions, 1 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 4ff4a0eecc9..5cf329fdda7 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,8 @@
+2020-03-12 Jonathan Wakely <jwakely@redhat.com>
+
+ * testsuite/tr1/8_c_compatibility/cstdlib/functions.cc: Do not pass
+ a null pointer to functions with nonnull(1) attribute.
+
2020-03-11 Patrick Palka <ppalka@redhat.com>
* include/std/ranges (split_view::_OuterIter::_OuterIter): Typo fix,
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;