From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2181) id C37303858C5F; Mon, 18 Mar 2024 14:04:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C37303858C5F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1710770647; bh=itbddLfJ7ryvn3wTv+4Gm6jG4Cv1jrzf135UBMs/Tpg=; h=From:To:Subject:Date:From; b=C0Wt4DuO9M8mydrlDg2NZCnzfNDWU4ndtcVcANUF+BAkJq61I8tLXISQSbRvPHN3C iu+E5/oo3g0H/dz0662WUXUkXPR32NPJ8JbzODkSefVLagdXokpqcvrMm9nI/K1L3D 7m6WD87pIb+AVDOt1LtAbpPJetLvv4XEZGANk3qw= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Jonathan Wakely To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r12-10230] libstdc++: Fix warning during configure X-Act-Checkin: gcc X-Git-Author: Jonathan Wakely X-Git-Refname: refs/heads/releases/gcc-12 X-Git-Oldrev: 22273b87425aa5bccf756ff8b1887dd6d4541588 X-Git-Newrev: 96e7603bf662010d282d739841c133e0723a2d39 Message-Id: <20240318140407.C37303858C5F@sourceware.org> Date: Mon, 18 Mar 2024 14:04:07 +0000 (GMT) List-Id: https://gcc.gnu.org/g:96e7603bf662010d282d739841c133e0723a2d39 commit r12-10230-g96e7603bf662010d282d739841c133e0723a2d39 Author: Jonathan Wakely Date: Wed Nov 1 14:20:33 2023 +0000 libstdc++: Fix warning during configure The checks for snprintf give a -Wformat warning due to a missing argument. libstdc++-v3/ChangeLog: * acinclude.m4 (GLIBCXX_ENABLE_C99): Fix snprintf checks. * configure: Regenerate. (cherry picked from commit 8a4cde6319b40802a842a8fe71267524dd8af828) Diff: --- libstdc++-v3/acinclude.m4 | 4 ++-- libstdc++-v3/configure | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4 index 321065aff72..c25e8a70638 100644 --- a/libstdc++-v3/acinclude.m4 +++ b/libstdc++-v3/acinclude.m4 @@ -978,7 +978,7 @@ AC_DEFUN([GLIBCXX_ENABLE_C99], [ vscanf("%i", args); vsnprintf(fmt, 0, "%i", args); vsscanf(fmt, "%i", args); - snprintf(fmt, 0, "%i"); + snprintf(fmt, 0, "%i", 1); }], [], [glibcxx_cv_c99_stdio_cxx98=yes], [glibcxx_cv_c99_stdio_cxx98=no]) ]) @@ -1210,7 +1210,7 @@ AC_DEFUN([GLIBCXX_ENABLE_C99], [ vscanf("%i", args); vsnprintf(fmt, 0, "%i", args); vsscanf(fmt, "%i", args); - snprintf(fmt, 0, "%i"); + snprintf(fmt, 0, "%i", 1); }], [], [glibcxx_cv_c99_stdio_cxx11=yes], [glibcxx_cv_c99_stdio_cxx11=no]) ]) diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure index b371f422ff3..67cae65c533 100755 --- a/libstdc++-v3/configure +++ b/libstdc++-v3/configure @@ -17573,7 +17573,7 @@ else vscanf("%i", args); vsnprintf(fmt, 0, "%i", args); vsscanf(fmt, "%i", args); - snprintf(fmt, 0, "%i"); + snprintf(fmt, 0, "%i", 1); } int main () @@ -17604,7 +17604,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext vscanf("%i", args); vsnprintf(fmt, 0, "%i", args); vsscanf(fmt, "%i", args); - snprintf(fmt, 0, "%i"); + snprintf(fmt, 0, "%i", 1); } int main () @@ -18249,7 +18249,7 @@ else vscanf("%i", args); vsnprintf(fmt, 0, "%i", args); vsscanf(fmt, "%i", args); - snprintf(fmt, 0, "%i"); + snprintf(fmt, 0, "%i", 1); } int main () @@ -18280,7 +18280,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext vscanf("%i", args); vsnprintf(fmt, 0, "%i", args); vsscanf(fmt, "%i", args); - snprintf(fmt, 0, "%i"); + snprintf(fmt, 0, "%i", 1); } int main ()