From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
To: libc-alpha@sourceware.org
Subject: [PATCH 2/4] sunrpc: Suppress GCC -O1 warning on user2netname [BZ #19444]
Date: Thu, 29 Dec 2022 09:58:00 -0300 [thread overview]
Message-ID: <20221229125802.2715435-3-adhemerval.zanella@linaro.org> (raw)
In-Reply-To: <20221229125802.2715435-1-adhemerval.zanella@linaro.org>
The same issue described by 6128e82ebe973163d2dd614d31753c88c0c4d645
also happend with -O1.
Checked on x86_64-linux-gnu.
---
sunrpc/netname.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/sunrpc/netname.c b/sunrpc/netname.c
index c1d1c43e50..a10591c071 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);
--
2.34.1
next prev parent reply other threads:[~2022-12-29 12:58 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-29 12:57 [PATCH 0/4] Fix remaining -Os/-O1 compile issues " Adhemerval Zanella
2022-12-29 12:57 ` [PATCH 1/4] locale: Use correct buffer size for utf8_sequence_error " Adhemerval Zanella
2023-01-09 16:40 ` Carlos O'Donell
2022-12-29 12:58 ` Adhemerval Zanella [this message]
2023-01-09 17:09 ` [PATCH 2/4] sunrpc: Suppress GCC -O1 warning on user2netname " Carlos O'Donell
2022-12-29 12:58 ` [PATCH 3/4] string: Suppress -Wmaybe-unitialized for wordcopy " Adhemerval Zanella
2023-01-10 22:47 ` Carlos O'Donell
2023-01-11 13:14 ` Adhemerval Zanella Netto
2023-01-11 19:33 ` Carlos O'Donell
2023-01-11 20:12 ` Carlos O'Donell
2022-12-29 12:58 ` [PATCH 4/4] math: Suppress -O0 warnings for soft-fp fsqrt " Adhemerval Zanella
2023-01-10 22:54 ` Carlos O'Donell
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=20221229125802.2715435-3-adhemerval.zanella@linaro.org \
--to=adhemerval.zanella@linaro.org \
--cc=libc-alpha@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).