public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc] sunrpc: Suppress GCC -O1 warning on user2netname [BZ #19444]
@ 2023-01-11 21:13 Adhemerval Zanella
0 siblings, 0 replies; only message in thread
From: Adhemerval Zanella @ 2023-01-11 21:13 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=8176efe3cabeee003f193f6b877297bf5aee8eb6
commit 8176efe3cabeee003f193f6b877297bf5aee8eb6
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Thu Dec 29 09:58:00 2022 -0300
sunrpc: Suppress GCC -O1 warning on user2netname [BZ #19444]
The same issue described by 6128e82ebe973163d2dd614d31753c88c0c4d645
also happend with -O1.
Checked on x86_64-linux-gnu.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Diff:
---
sunrpc/netname.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/sunrpc/netname.c b/sunrpc/netname.c
index 4fde0bf91c..dd2cb1b441 100644
--- a/sunrpc/netname.c
+++ b/sunrpc/netname.c
@@ -49,10 +49,11 @@ user2netname (char netname[MAXNETNAMELEN + 1], const uid_t uid,
if ((strlen (dfltdom) + OPSYS_LEN + 3 + MAXIPRINT) > (size_t) MAXNETNAMELEN)
return 0;
- /* GCC with -Os warns that sprint might overflow while handling dfltdom,
- however the above test does check if an overflow would happen. */
+ /* GCC with -Os or -O1 warns that sprint might overflow while handling
+ dfltdom, however the above test does check if an overflow would
+ happen. */
DIAG_PUSH_NEEDS_COMMENT;
- DIAG_IGNORE_Os_NEEDS_COMMENT (8, "-Wformat-overflow");
+ DIAG_IGNORE_NEEDS_COMMENT (8, "-Wformat-overflow");
sprintf (netname, "%s.%d@%s", OPSYS, uid, dfltdom);
DIAG_POP_NEEDS_COMMENT;
i = strlen (netname);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-01-11 21:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-11 21:13 [glibc] sunrpc: Suppress GCC -O1 warning on user2netname [BZ #19444] Adhemerval Zanella
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).