From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1984) id DB90E3AF1C3C; Fri, 17 Jul 2020 13:48:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DB90E3AF1C3C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1594993685; bh=7MYBVJvWMysiiwJiuswqFPvySCIq+iq7WmMPzN8B274=; h=From:To:Subject:Date:From; b=AtaomlPC/9+TEtAKaifzWbDLbIyhl1glT6uWBvX+AIRxurip+SeoiDgEtXL0RwDTl Gl4ae3jnBffX3k4CLv5UfunOslKNE6UZJYk4rc0lQRa7pvA7cs4hXrNxZu7bZvA4k9 QesU2HVLOOfKcbnk1BVZU2FUxC+JzLRpcXzir+zc= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Tamar Christina 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 X-Act-Checkin: gcc X-Git-Author: Jonathan Wakely X-Git-Refname: refs/vendors/ARM/heads/arm-perf-staging X-Git-Oldrev: 54f46d82f54ba7a4110cef102b7c18eaf8b4b6bd X-Git-Newrev: fcc443b97e19d9c8a2d8ccdfa4cc20682165827e Message-Id: <20200717134805.DB90E3AF1C3C@sourceware.org> Date: Fri, 17 Jul 2020 13:48:05 +0000 (GMT) X-BeenThere: libstdc++-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jul 2020 13:48:06 -0000 https://gcc.gnu.org/g:fcc443b97e19d9c8a2d8ccdfa4cc20682165827e commit fcc443b97e19d9c8a2d8ccdfa4cc20682165827e Author: Jonathan Wakely 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 + + * 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 * 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;