public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
From: Tamar Christina <tnfchris@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org
Subject: [gcc(refs/vendors/ARM/heads/arm-perf-staging)] libstdc++: Fix test failure due to -Wnonnull warnings
Date: Fri, 17 Jul 2020 13:48:05 +0000 (GMT)	[thread overview]
Message-ID: <20200717134805.DB90E3AF1C3C@sourceware.org> (raw)

https://gcc.gnu.org/g:fcc443b97e19d9c8a2d8ccdfa4cc20682165827e

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:
---
 libstdc++-v3/ChangeLog                                            | 5 +++++
 libstdc++-v3/testsuite/tr1/8_c_compatibility/cstdlib/functions.cc | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

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;


                 reply	other threads:[~2020-07-17 13:48 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200717134805.DB90E3AF1C3C@sourceware.org \
    --to=tnfchris@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    --cc=libstdc++-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).