public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Adhemerval Zanella <azanella@sourceware.org>
To: glibc-cvs@sourceware.org
Subject: [glibc] sunrpc: Fix netname build with older gcc
Date: Wed, 26 Jul 2023 14:21:54 +0000 (GMT) [thread overview]
Message-ID: <20230726142154.E70513857732@sourceware.org> (raw)
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=0eb6b2725ba4aae73c03ac1f05c31cd2a073c99a
commit 0eb6b2725ba4aae73c03ac1f05c31cd2a073c99a
Author: Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>
Date: Mon Jul 24 14:15:23 2023 -0300
sunrpc: Fix netname build with older gcc
The -Wformat-overflow was added by gcc 8.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Diff:
---
sunrpc/netname.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/sunrpc/netname.c b/sunrpc/netname.c
index d9d82501b0..9e2f78329e 100644
--- a/sunrpc/netname.c
+++ b/sunrpc/netname.c
@@ -52,10 +52,14 @@ user2netname (char netname[MAXNETNAMELEN + 1], const uid_t uid,
/* GCC with -Os or -O1 warns that sprint might overflow while handling
dfltdom, however the above test does check if an overflow would
happen. */
+#if __GNUC_PREREQ (8, 0)
DIAG_PUSH_NEEDS_COMMENT;
DIAG_IGNORE_NEEDS_COMMENT (8, "-Wformat-overflow");
+#endif
sprintf (netname, "%s.%d@%s", OPSYS, uid, dfltdom);
+#if __GNUC_PREREQ (8, 0)
DIAG_POP_NEEDS_COMMENT;
+#endif
i = strlen (netname);
if (netname[i - 1] == '.')
netname[i - 1] = '\0';
reply other threads:[~2023-07-26 14:21 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=20230726142154.E70513857732@sourceware.org \
--to=azanella@sourceware.org \
--cc=glibc-cvs@sourceware.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).