public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc/release/2.37/master] sunrpc: Fix netname build with older gcc
@ 2024-01-29 22:12 Florian Weimer
  0 siblings, 0 replies; only message in thread
From: Florian Weimer @ 2024-01-29 22:12 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=8b8a3f0aafa30510abc5809db99c026af9a48016

commit 8b8a3f0aafa30510abc5809db99c026af9a48016
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>
    
    (cherry picked from commit 0eb6b2725ba4aae73c03ac1f05c31cd2a073c99a)

Diff:
---
 sunrpc/netname.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/sunrpc/netname.c b/sunrpc/netname.c
index dd2cb1b441..6641d25625 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';

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-01-29 22:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-29 22:12 [glibc/release/2.37/master] sunrpc: Fix netname build with older gcc Florian Weimer

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).