public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
From: Jonathan Wakely <redi@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org
Subject: [gcc r12-10230] libstdc++: Fix warning during configure
Date: Mon, 18 Mar 2024 14:04:07 +0000 (GMT)	[thread overview]
Message-ID: <20240318140407.C37303858C5F@sourceware.org> (raw)

https://gcc.gnu.org/g:96e7603bf662010d282d739841c133e0723a2d39

commit r12-10230-g96e7603bf662010d282d739841c133e0723a2d39
Author: Jonathan Wakely <jwakely@redhat.com>
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 ()

                 reply	other threads:[~2024-03-18 14:04 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=20240318140407.C37303858C5F@sourceware.org \
    --to=redi@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).