public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc/azanella/clang] sunrpc: Suppress clang warning on struct cmessage
@ 2022-03-15 18:38 Adhemerval Zanella
  0 siblings, 0 replies; 23+ messages in thread
From: Adhemerval Zanella @ 2022-03-15 18:38 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=03ec014fc98b53dd99f4f4a7c73956e084cfc27d

commit 03ec014fc98b53dd99f4f4a7c73956e084cfc27d
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 10 14:08:06 2022 -0300

    sunrpc: Suppress clang warning on struct cmessage

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

diff --git a/sunrpc/svc_unix.c b/sunrpc/svc_unix.c
index 67177a2e78..8b136f4870 100644
--- a/sunrpc/svc_unix.c
+++ b/sunrpc/svc_unix.c
@@ -65,6 +65,7 @@
 #include <libintl.h>
 #include <wchar.h>
 #include <shlib-compat.h>
+#include <libc-diag.h>
 
 /*
  * Ops vector for AF_UNIX based rpc service handle
@@ -308,12 +309,18 @@ svcunix_destroy (SVCXPRT *xprt)
 }
 
 #ifdef SCM_CREDENTIALS
+/* clang complains if a flexible array member (struct cmsghdr) is not a the
+   end of the struct (since it is a GNU extension).  The __msgread explicit
+   expects that 'struct ucred' is after the 'cmsg', so disable the warning.  */
+DIAG_PUSH_NEEDS_COMMENT_CLANG;
+DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wgnu-variable-sized-type-not-at-end");
 struct cmessage {
   struct cmsghdr cmsg;
   struct ucred cmcred;
   /* hack to make sure we have enough memory */
   char dummy[(CMSG_ALIGN (sizeof (struct ucred)) - sizeof (struct ucred) + sizeof (long))];
 };
+DIAG_POP_NEEDS_COMMENT_CLANG;
 
 /* XXX This is not thread safe, but since the main functions in svc.c
    and the rpcgen generated *_svc functions for the daemon are also not


^ permalink raw reply	[flat|nested] 23+ messages in thread
* [glibc/azanella/clang] sunrpc: Suppress clang warning on struct cmessage
@ 2024-02-09 17:29 Adhemerval Zanella
  0 siblings, 0 replies; 23+ messages in thread
From: Adhemerval Zanella @ 2024-02-09 17:29 UTC (permalink / raw)
  To: glibc-cvs

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

commit aaeb500a73424099bd42ed3243ba58b75809767b
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 10 14:08:06 2022 -0300

    sunrpc: Suppress clang warning on struct cmessage
    
    clang complains if a flexible array member (struct cmsghdr) is not a
    the end of the struct (since it is a GNU extension).  The __msgread
    explicit expects that 'struct ucred' is after the 'cmsg', so suppress
    the warning.

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

diff --git a/sunrpc/svc_unix.c b/sunrpc/svc_unix.c
index 8363669c09..c56284e333 100644
--- a/sunrpc/svc_unix.c
+++ b/sunrpc/svc_unix.c
@@ -65,6 +65,7 @@
 #include <libintl.h>
 #include <wchar.h>
 #include <shlib-compat.h>
+#include <libc-diag.h>
 
 /*
  * Ops vector for AF_UNIX based rpc service handle
@@ -308,12 +309,18 @@ svcunix_destroy (SVCXPRT *xprt)
 }
 
 #ifdef SCM_CREDENTIALS
+/* clang complains if a flexible array member (struct cmsghdr) is not a the
+   end of the struct (since it is a GNU extension).  The __msgread explicit
+   expects that 'struct ucred' is after the 'cmsg', so disable the warning.  */
+DIAG_PUSH_NEEDS_COMMENT_CLANG;
+DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wgnu-variable-sized-type-not-at-end");
 struct cmessage {
   struct cmsghdr cmsg;
   struct ucred cmcred;
   /* hack to make sure we have enough memory */
   char dummy[(CMSG_ALIGN (sizeof (struct ucred)) - sizeof (struct ucred) + sizeof (long))];
 };
+DIAG_POP_NEEDS_COMMENT_CLANG;
 
 /* XXX This is not thread safe, but since the main functions in svc.c
    and the rpcgen generated *_svc functions for the daemon are also not

^ permalink raw reply	[flat|nested] 23+ messages in thread
* [glibc/azanella/clang] sunrpc: Suppress clang warning on struct cmessage
@ 2024-02-07 14:05 Adhemerval Zanella
  0 siblings, 0 replies; 23+ messages in thread
From: Adhemerval Zanella @ 2024-02-07 14:05 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=233dc7bdb3882d53c3af8d70ecd9f15cc3b46cbc

commit 233dc7bdb3882d53c3af8d70ecd9f15cc3b46cbc
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 10 14:08:06 2022 -0300

    sunrpc: Suppress clang warning on struct cmessage
    
    clang complains if a flexible array member (struct cmsghdr) is not a
    the end of the struct (since it is a GNU extension).  The __msgread
    explicit expects that 'struct ucred' is after the 'cmsg', so suppress
    the warning.

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

diff --git a/sunrpc/svc_unix.c b/sunrpc/svc_unix.c
index 8363669c09..c56284e333 100644
--- a/sunrpc/svc_unix.c
+++ b/sunrpc/svc_unix.c
@@ -65,6 +65,7 @@
 #include <libintl.h>
 #include <wchar.h>
 #include <shlib-compat.h>
+#include <libc-diag.h>
 
 /*
  * Ops vector for AF_UNIX based rpc service handle
@@ -308,12 +309,18 @@ svcunix_destroy (SVCXPRT *xprt)
 }
 
 #ifdef SCM_CREDENTIALS
+/* clang complains if a flexible array member (struct cmsghdr) is not a the
+   end of the struct (since it is a GNU extension).  The __msgread explicit
+   expects that 'struct ucred' is after the 'cmsg', so disable the warning.  */
+DIAG_PUSH_NEEDS_COMMENT_CLANG;
+DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wgnu-variable-sized-type-not-at-end");
 struct cmessage {
   struct cmsghdr cmsg;
   struct ucred cmcred;
   /* hack to make sure we have enough memory */
   char dummy[(CMSG_ALIGN (sizeof (struct ucred)) - sizeof (struct ucred) + sizeof (long))];
 };
+DIAG_POP_NEEDS_COMMENT_CLANG;
 
 /* XXX This is not thread safe, but since the main functions in svc.c
    and the rpcgen generated *_svc functions for the daemon are also not

^ permalink raw reply	[flat|nested] 23+ messages in thread
* [glibc/azanella/clang] sunrpc: Suppress clang warning on struct cmessage
@ 2024-01-29 17:55 Adhemerval Zanella
  0 siblings, 0 replies; 23+ messages in thread
From: Adhemerval Zanella @ 2024-01-29 17:55 UTC (permalink / raw)
  To: glibc-cvs

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

commit eb0770c220c931a0148bb5e3b121635fd3a62996
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 10 14:08:06 2022 -0300

    sunrpc: Suppress clang warning on struct cmessage
    
    clang complains if a flexible array member (struct cmsghdr) is not a
    the end of the struct (since it is a GNU extension).  The __msgread
    explicit expects that 'struct ucred' is after the 'cmsg', so suppress
    the warning.

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

diff --git a/sunrpc/svc_unix.c b/sunrpc/svc_unix.c
index 8363669c09..c56284e333 100644
--- a/sunrpc/svc_unix.c
+++ b/sunrpc/svc_unix.c
@@ -65,6 +65,7 @@
 #include <libintl.h>
 #include <wchar.h>
 #include <shlib-compat.h>
+#include <libc-diag.h>
 
 /*
  * Ops vector for AF_UNIX based rpc service handle
@@ -308,12 +309,18 @@ svcunix_destroy (SVCXPRT *xprt)
 }
 
 #ifdef SCM_CREDENTIALS
+/* clang complains if a flexible array member (struct cmsghdr) is not a the
+   end of the struct (since it is a GNU extension).  The __msgread explicit
+   expects that 'struct ucred' is after the 'cmsg', so disable the warning.  */
+DIAG_PUSH_NEEDS_COMMENT_CLANG;
+DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wgnu-variable-sized-type-not-at-end");
 struct cmessage {
   struct cmsghdr cmsg;
   struct ucred cmcred;
   /* hack to make sure we have enough memory */
   char dummy[(CMSG_ALIGN (sizeof (struct ucred)) - sizeof (struct ucred) + sizeof (long))];
 };
+DIAG_POP_NEEDS_COMMENT_CLANG;
 
 /* XXX This is not thread safe, but since the main functions in svc.c
    and the rpcgen generated *_svc functions for the daemon are also not

^ permalink raw reply	[flat|nested] 23+ messages in thread
* [glibc/azanella/clang] sunrpc: Suppress clang warning on struct cmessage
@ 2023-12-21 18:52 Adhemerval Zanella
  0 siblings, 0 replies; 23+ messages in thread
From: Adhemerval Zanella @ 2023-12-21 18:52 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=61a8e25865d9d862ffa15416d23c72e42ab1a97a

commit 61a8e25865d9d862ffa15416d23c72e42ab1a97a
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 10 14:08:06 2022 -0300

    sunrpc: Suppress clang warning on struct cmessage
    
    clang complains if a flexible array member (struct cmsghdr) is not a
    the end of the struct (since it is a GNU extension).  The __msgread
    explicit expects that 'struct ucred' is after the 'cmsg', so suppress
    the warning.

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

diff --git a/sunrpc/svc_unix.c b/sunrpc/svc_unix.c
index be247f748c..9426850e4b 100644
--- a/sunrpc/svc_unix.c
+++ b/sunrpc/svc_unix.c
@@ -65,6 +65,7 @@
 #include <libintl.h>
 #include <wchar.h>
 #include <shlib-compat.h>
+#include <libc-diag.h>
 
 /*
  * Ops vector for AF_UNIX based rpc service handle
@@ -308,12 +309,18 @@ svcunix_destroy (SVCXPRT *xprt)
 }
 
 #ifdef SCM_CREDENTIALS
+/* clang complains if a flexible array member (struct cmsghdr) is not a the
+   end of the struct (since it is a GNU extension).  The __msgread explicit
+   expects that 'struct ucred' is after the 'cmsg', so disable the warning.  */
+DIAG_PUSH_NEEDS_COMMENT_CLANG;
+DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wgnu-variable-sized-type-not-at-end");
 struct cmessage {
   struct cmsghdr cmsg;
   struct ucred cmcred;
   /* hack to make sure we have enough memory */
   char dummy[(CMSG_ALIGN (sizeof (struct ucred)) - sizeof (struct ucred) + sizeof (long))];
 };
+DIAG_POP_NEEDS_COMMENT_CLANG;
 
 /* XXX This is not thread safe, but since the main functions in svc.c
    and the rpcgen generated *_svc functions for the daemon are also not

^ permalink raw reply	[flat|nested] 23+ messages in thread
* [glibc/azanella/clang] sunrpc: Suppress clang warning on struct cmessage
@ 2023-09-28 17:50 Adhemerval Zanella
  0 siblings, 0 replies; 23+ messages in thread
From: Adhemerval Zanella @ 2023-09-28 17:50 UTC (permalink / raw)
  To: glibc-cvs

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

commit bf8a8e23506d26b79d03b4e23661e2a5a37d6990
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 10 14:08:06 2022 -0300

    sunrpc: Suppress clang warning on struct cmessage
    
    clang complains if a flexible array member (struct cmsghdr) is not a
    the end of the struct (since it is a GNU extension).  The __msgread
    explicit expects that 'struct ucred' is after the 'cmsg', so suppress
    the warning.

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

diff --git a/sunrpc/svc_unix.c b/sunrpc/svc_unix.c
index be247f748c..9426850e4b 100644
--- a/sunrpc/svc_unix.c
+++ b/sunrpc/svc_unix.c
@@ -65,6 +65,7 @@
 #include <libintl.h>
 #include <wchar.h>
 #include <shlib-compat.h>
+#include <libc-diag.h>
 
 /*
  * Ops vector for AF_UNIX based rpc service handle
@@ -308,12 +309,18 @@ svcunix_destroy (SVCXPRT *xprt)
 }
 
 #ifdef SCM_CREDENTIALS
+/* clang complains if a flexible array member (struct cmsghdr) is not a the
+   end of the struct (since it is a GNU extension).  The __msgread explicit
+   expects that 'struct ucred' is after the 'cmsg', so disable the warning.  */
+DIAG_PUSH_NEEDS_COMMENT_CLANG;
+DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wgnu-variable-sized-type-not-at-end");
 struct cmessage {
   struct cmsghdr cmsg;
   struct ucred cmcred;
   /* hack to make sure we have enough memory */
   char dummy[(CMSG_ALIGN (sizeof (struct ucred)) - sizeof (struct ucred) + sizeof (long))];
 };
+DIAG_POP_NEEDS_COMMENT_CLANG;
 
 /* XXX This is not thread safe, but since the main functions in svc.c
    and the rpcgen generated *_svc functions for the daemon are also not

^ permalink raw reply	[flat|nested] 23+ messages in thread
* [glibc/azanella/clang] sunrpc: Suppress clang warning on struct cmessage
@ 2023-08-30 12:35 Adhemerval Zanella
  0 siblings, 0 replies; 23+ messages in thread
From: Adhemerval Zanella @ 2023-08-30 12:35 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=880438a144a72b9159d39ae30bf8d1e99ca8efc0

commit 880438a144a72b9159d39ae30bf8d1e99ca8efc0
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 10 14:08:06 2022 -0300

    sunrpc: Suppress clang warning on struct cmessage

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

diff --git a/sunrpc/svc_unix.c b/sunrpc/svc_unix.c
index be247f748c..9426850e4b 100644
--- a/sunrpc/svc_unix.c
+++ b/sunrpc/svc_unix.c
@@ -65,6 +65,7 @@
 #include <libintl.h>
 #include <wchar.h>
 #include <shlib-compat.h>
+#include <libc-diag.h>
 
 /*
  * Ops vector for AF_UNIX based rpc service handle
@@ -308,12 +309,18 @@ svcunix_destroy (SVCXPRT *xprt)
 }
 
 #ifdef SCM_CREDENTIALS
+/* clang complains if a flexible array member (struct cmsghdr) is not a the
+   end of the struct (since it is a GNU extension).  The __msgread explicit
+   expects that 'struct ucred' is after the 'cmsg', so disable the warning.  */
+DIAG_PUSH_NEEDS_COMMENT_CLANG;
+DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wgnu-variable-sized-type-not-at-end");
 struct cmessage {
   struct cmsghdr cmsg;
   struct ucred cmcred;
   /* hack to make sure we have enough memory */
   char dummy[(CMSG_ALIGN (sizeof (struct ucred)) - sizeof (struct ucred) + sizeof (long))];
 };
+DIAG_POP_NEEDS_COMMENT_CLANG;
 
 /* XXX This is not thread safe, but since the main functions in svc.c
    and the rpcgen generated *_svc functions for the daemon are also not

^ permalink raw reply	[flat|nested] 23+ messages in thread
* [glibc/azanella/clang] sunrpc: Suppress clang warning on struct cmessage
@ 2023-02-09 19:47 Adhemerval Zanella
  0 siblings, 0 replies; 23+ messages in thread
From: Adhemerval Zanella @ 2023-02-09 19:47 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=162729ed31e33724f9285180d6ca12e40189b9ae

commit 162729ed31e33724f9285180d6ca12e40189b9ae
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 10 14:08:06 2022 -0300

    sunrpc: Suppress clang warning on struct cmessage

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

diff --git a/sunrpc/svc_unix.c b/sunrpc/svc_unix.c
index be247f748c..9426850e4b 100644
--- a/sunrpc/svc_unix.c
+++ b/sunrpc/svc_unix.c
@@ -65,6 +65,7 @@
 #include <libintl.h>
 #include <wchar.h>
 #include <shlib-compat.h>
+#include <libc-diag.h>
 
 /*
  * Ops vector for AF_UNIX based rpc service handle
@@ -308,12 +309,18 @@ svcunix_destroy (SVCXPRT *xprt)
 }
 
 #ifdef SCM_CREDENTIALS
+/* clang complains if a flexible array member (struct cmsghdr) is not a the
+   end of the struct (since it is a GNU extension).  The __msgread explicit
+   expects that 'struct ucred' is after the 'cmsg', so disable the warning.  */
+DIAG_PUSH_NEEDS_COMMENT_CLANG;
+DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wgnu-variable-sized-type-not-at-end");
 struct cmessage {
   struct cmsghdr cmsg;
   struct ucred cmcred;
   /* hack to make sure we have enough memory */
   char dummy[(CMSG_ALIGN (sizeof (struct ucred)) - sizeof (struct ucred) + sizeof (long))];
 };
+DIAG_POP_NEEDS_COMMENT_CLANG;
 
 /* XXX This is not thread safe, but since the main functions in svc.c
    and the rpcgen generated *_svc functions for the daemon are also not

^ permalink raw reply	[flat|nested] 23+ messages in thread
* [glibc/azanella/clang] sunrpc: Suppress clang warning on struct cmessage
@ 2022-10-28 17:40 Adhemerval Zanella
  0 siblings, 0 replies; 23+ messages in thread
From: Adhemerval Zanella @ 2022-10-28 17:40 UTC (permalink / raw)
  To: glibc-cvs

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

commit e969d4759f0e53c8b6d59bf9199192a21dce7109
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 10 14:08:06 2022 -0300

    sunrpc: Suppress clang warning on struct cmessage

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

diff --git a/sunrpc/svc_unix.c b/sunrpc/svc_unix.c
index 67177a2e78..8b136f4870 100644
--- a/sunrpc/svc_unix.c
+++ b/sunrpc/svc_unix.c
@@ -65,6 +65,7 @@
 #include <libintl.h>
 #include <wchar.h>
 #include <shlib-compat.h>
+#include <libc-diag.h>
 
 /*
  * Ops vector for AF_UNIX based rpc service handle
@@ -308,12 +309,18 @@ svcunix_destroy (SVCXPRT *xprt)
 }
 
 #ifdef SCM_CREDENTIALS
+/* clang complains if a flexible array member (struct cmsghdr) is not a the
+   end of the struct (since it is a GNU extension).  The __msgread explicit
+   expects that 'struct ucred' is after the 'cmsg', so disable the warning.  */
+DIAG_PUSH_NEEDS_COMMENT_CLANG;
+DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wgnu-variable-sized-type-not-at-end");
 struct cmessage {
   struct cmsghdr cmsg;
   struct ucred cmcred;
   /* hack to make sure we have enough memory */
   char dummy[(CMSG_ALIGN (sizeof (struct ucred)) - sizeof (struct ucred) + sizeof (long))];
 };
+DIAG_POP_NEEDS_COMMENT_CLANG;
 
 /* XXX This is not thread safe, but since the main functions in svc.c
    and the rpcgen generated *_svc functions for the daemon are also not

^ permalink raw reply	[flat|nested] 23+ messages in thread
* [glibc/azanella/clang] sunrpc: Suppress clang warning on struct cmessage
@ 2022-10-04 12:57 Adhemerval Zanella
  0 siblings, 0 replies; 23+ messages in thread
From: Adhemerval Zanella @ 2022-10-04 12:57 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=63c99ec9bc782da9c144d3f5713d3ada0d2b9b52

commit 63c99ec9bc782da9c144d3f5713d3ada0d2b9b52
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 10 14:08:06 2022 -0300

    sunrpc: Suppress clang warning on struct cmessage

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

diff --git a/sunrpc/svc_unix.c b/sunrpc/svc_unix.c
index 67177a2e78..8b136f4870 100644
--- a/sunrpc/svc_unix.c
+++ b/sunrpc/svc_unix.c
@@ -65,6 +65,7 @@
 #include <libintl.h>
 #include <wchar.h>
 #include <shlib-compat.h>
+#include <libc-diag.h>
 
 /*
  * Ops vector for AF_UNIX based rpc service handle
@@ -308,12 +309,18 @@ svcunix_destroy (SVCXPRT *xprt)
 }
 
 #ifdef SCM_CREDENTIALS
+/* clang complains if a flexible array member (struct cmsghdr) is not a the
+   end of the struct (since it is a GNU extension).  The __msgread explicit
+   expects that 'struct ucred' is after the 'cmsg', so disable the warning.  */
+DIAG_PUSH_NEEDS_COMMENT_CLANG;
+DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wgnu-variable-sized-type-not-at-end");
 struct cmessage {
   struct cmsghdr cmsg;
   struct ucred cmcred;
   /* hack to make sure we have enough memory */
   char dummy[(CMSG_ALIGN (sizeof (struct ucred)) - sizeof (struct ucred) + sizeof (long))];
 };
+DIAG_POP_NEEDS_COMMENT_CLANG;
 
 /* XXX This is not thread safe, but since the main functions in svc.c
    and the rpcgen generated *_svc functions for the daemon are also not

^ permalink raw reply	[flat|nested] 23+ messages in thread
* [glibc/azanella/clang] sunrpc: Suppress clang warning on struct cmessage
@ 2022-06-09 21:18 Adhemerval Zanella
  0 siblings, 0 replies; 23+ messages in thread
From: Adhemerval Zanella @ 2022-06-09 21:18 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=72622cb93034486000ddc2308937efd8fbe3e133

commit 72622cb93034486000ddc2308937efd8fbe3e133
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 10 14:08:06 2022 -0300

    sunrpc: Suppress clang warning on struct cmessage

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

diff --git a/sunrpc/svc_unix.c b/sunrpc/svc_unix.c
index 67177a2e78..8b136f4870 100644
--- a/sunrpc/svc_unix.c
+++ b/sunrpc/svc_unix.c
@@ -65,6 +65,7 @@
 #include <libintl.h>
 #include <wchar.h>
 #include <shlib-compat.h>
+#include <libc-diag.h>
 
 /*
  * Ops vector for AF_UNIX based rpc service handle
@@ -308,12 +309,18 @@ svcunix_destroy (SVCXPRT *xprt)
 }
 
 #ifdef SCM_CREDENTIALS
+/* clang complains if a flexible array member (struct cmsghdr) is not a the
+   end of the struct (since it is a GNU extension).  The __msgread explicit
+   expects that 'struct ucred' is after the 'cmsg', so disable the warning.  */
+DIAG_PUSH_NEEDS_COMMENT_CLANG;
+DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wgnu-variable-sized-type-not-at-end");
 struct cmessage {
   struct cmsghdr cmsg;
   struct ucred cmcred;
   /* hack to make sure we have enough memory */
   char dummy[(CMSG_ALIGN (sizeof (struct ucred)) - sizeof (struct ucred) + sizeof (long))];
 };
+DIAG_POP_NEEDS_COMMENT_CLANG;
 
 /* XXX This is not thread safe, but since the main functions in svc.c
    and the rpcgen generated *_svc functions for the daemon are also not


^ permalink raw reply	[flat|nested] 23+ messages in thread
* [glibc/azanella/clang] sunrpc: Suppress clang warning on struct cmessage
@ 2022-06-09 13:15 Adhemerval Zanella
  0 siblings, 0 replies; 23+ messages in thread
From: Adhemerval Zanella @ 2022-06-09 13:15 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=72622cb93034486000ddc2308937efd8fbe3e133

commit 72622cb93034486000ddc2308937efd8fbe3e133
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 10 14:08:06 2022 -0300

    sunrpc: Suppress clang warning on struct cmessage

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

diff --git a/sunrpc/svc_unix.c b/sunrpc/svc_unix.c
index 67177a2e78..8b136f4870 100644
--- a/sunrpc/svc_unix.c
+++ b/sunrpc/svc_unix.c
@@ -65,6 +65,7 @@
 #include <libintl.h>
 #include <wchar.h>
 #include <shlib-compat.h>
+#include <libc-diag.h>
 
 /*
  * Ops vector for AF_UNIX based rpc service handle
@@ -308,12 +309,18 @@ svcunix_destroy (SVCXPRT *xprt)
 }
 
 #ifdef SCM_CREDENTIALS
+/* clang complains if a flexible array member (struct cmsghdr) is not a the
+   end of the struct (since it is a GNU extension).  The __msgread explicit
+   expects that 'struct ucred' is after the 'cmsg', so disable the warning.  */
+DIAG_PUSH_NEEDS_COMMENT_CLANG;
+DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wgnu-variable-sized-type-not-at-end");
 struct cmessage {
   struct cmsghdr cmsg;
   struct ucred cmcred;
   /* hack to make sure we have enough memory */
   char dummy[(CMSG_ALIGN (sizeof (struct ucred)) - sizeof (struct ucred) + sizeof (long))];
 };
+DIAG_POP_NEEDS_COMMENT_CLANG;
 
 /* XXX This is not thread safe, but since the main functions in svc.c
    and the rpcgen generated *_svc functions for the daemon are also not


^ permalink raw reply	[flat|nested] 23+ messages in thread
* [glibc/azanella/clang] sunrpc: Suppress clang warning on struct cmessage
@ 2022-06-03 14:04 Adhemerval Zanella
  0 siblings, 0 replies; 23+ messages in thread
From: Adhemerval Zanella @ 2022-06-03 14:04 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=20ae84f3ba0e185d8c55f7ee2f807a35e76e8ab5

commit 20ae84f3ba0e185d8c55f7ee2f807a35e76e8ab5
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 10 14:08:06 2022 -0300

    sunrpc: Suppress clang warning on struct cmessage

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

diff --git a/sunrpc/svc_unix.c b/sunrpc/svc_unix.c
index 67177a2e78..8b136f4870 100644
--- a/sunrpc/svc_unix.c
+++ b/sunrpc/svc_unix.c
@@ -65,6 +65,7 @@
 #include <libintl.h>
 #include <wchar.h>
 #include <shlib-compat.h>
+#include <libc-diag.h>
 
 /*
  * Ops vector for AF_UNIX based rpc service handle
@@ -308,12 +309,18 @@ svcunix_destroy (SVCXPRT *xprt)
 }
 
 #ifdef SCM_CREDENTIALS
+/* clang complains if a flexible array member (struct cmsghdr) is not a the
+   end of the struct (since it is a GNU extension).  The __msgread explicit
+   expects that 'struct ucred' is after the 'cmsg', so disable the warning.  */
+DIAG_PUSH_NEEDS_COMMENT_CLANG;
+DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wgnu-variable-sized-type-not-at-end");
 struct cmessage {
   struct cmsghdr cmsg;
   struct ucred cmcred;
   /* hack to make sure we have enough memory */
   char dummy[(CMSG_ALIGN (sizeof (struct ucred)) - sizeof (struct ucred) + sizeof (long))];
 };
+DIAG_POP_NEEDS_COMMENT_CLANG;
 
 /* XXX This is not thread safe, but since the main functions in svc.c
    and the rpcgen generated *_svc functions for the daemon are also not


^ permalink raw reply	[flat|nested] 23+ messages in thread
* [glibc/azanella/clang] sunrpc: Suppress clang warning on struct cmessage
@ 2022-05-13 14:18 Adhemerval Zanella
  0 siblings, 0 replies; 23+ messages in thread
From: Adhemerval Zanella @ 2022-05-13 14:18 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=466dc3660db53508a73279aad0c25c16217da8be

commit 466dc3660db53508a73279aad0c25c16217da8be
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 10 14:08:06 2022 -0300

    sunrpc: Suppress clang warning on struct cmessage

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

diff --git a/sunrpc/svc_unix.c b/sunrpc/svc_unix.c
index 67177a2e78..8b136f4870 100644
--- a/sunrpc/svc_unix.c
+++ b/sunrpc/svc_unix.c
@@ -65,6 +65,7 @@
 #include <libintl.h>
 #include <wchar.h>
 #include <shlib-compat.h>
+#include <libc-diag.h>
 
 /*
  * Ops vector for AF_UNIX based rpc service handle
@@ -308,12 +309,18 @@ svcunix_destroy (SVCXPRT *xprt)
 }
 
 #ifdef SCM_CREDENTIALS
+/* clang complains if a flexible array member (struct cmsghdr) is not a the
+   end of the struct (since it is a GNU extension).  The __msgread explicit
+   expects that 'struct ucred' is after the 'cmsg', so disable the warning.  */
+DIAG_PUSH_NEEDS_COMMENT_CLANG;
+DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wgnu-variable-sized-type-not-at-end");
 struct cmessage {
   struct cmsghdr cmsg;
   struct ucred cmcred;
   /* hack to make sure we have enough memory */
   char dummy[(CMSG_ALIGN (sizeof (struct ucred)) - sizeof (struct ucred) + sizeof (long))];
 };
+DIAG_POP_NEEDS_COMMENT_CLANG;
 
 /* XXX This is not thread safe, but since the main functions in svc.c
    and the rpcgen generated *_svc functions for the daemon are also not


^ permalink raw reply	[flat|nested] 23+ messages in thread
* [glibc/azanella/clang] sunrpc: Suppress clang warning on struct cmessage
@ 2022-05-12 19:32 Adhemerval Zanella
  0 siblings, 0 replies; 23+ messages in thread
From: Adhemerval Zanella @ 2022-05-12 19:32 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=0de9b02722135404a6f127bfdfc76df455a33ec7

commit 0de9b02722135404a6f127bfdfc76df455a33ec7
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 10 14:08:06 2022 -0300

    sunrpc: Suppress clang warning on struct cmessage

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

diff --git a/sunrpc/svc_unix.c b/sunrpc/svc_unix.c
index 67177a2e78..8b136f4870 100644
--- a/sunrpc/svc_unix.c
+++ b/sunrpc/svc_unix.c
@@ -65,6 +65,7 @@
 #include <libintl.h>
 #include <wchar.h>
 #include <shlib-compat.h>
+#include <libc-diag.h>
 
 /*
  * Ops vector for AF_UNIX based rpc service handle
@@ -308,12 +309,18 @@ svcunix_destroy (SVCXPRT *xprt)
 }
 
 #ifdef SCM_CREDENTIALS
+/* clang complains if a flexible array member (struct cmsghdr) is not a the
+   end of the struct (since it is a GNU extension).  The __msgread explicit
+   expects that 'struct ucred' is after the 'cmsg', so disable the warning.  */
+DIAG_PUSH_NEEDS_COMMENT_CLANG;
+DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wgnu-variable-sized-type-not-at-end");
 struct cmessage {
   struct cmsghdr cmsg;
   struct ucred cmcred;
   /* hack to make sure we have enough memory */
   char dummy[(CMSG_ALIGN (sizeof (struct ucred)) - sizeof (struct ucred) + sizeof (long))];
 };
+DIAG_POP_NEEDS_COMMENT_CLANG;
 
 /* XXX This is not thread safe, but since the main functions in svc.c
    and the rpcgen generated *_svc functions for the daemon are also not


^ permalink raw reply	[flat|nested] 23+ messages in thread
* [glibc/azanella/clang] sunrpc: Suppress clang warning on struct cmessage
@ 2022-05-10 18:22 Adhemerval Zanella
  0 siblings, 0 replies; 23+ messages in thread
From: Adhemerval Zanella @ 2022-05-10 18:22 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=4d8e0044279e6590aca6c627db78ad673eb53a7f

commit 4d8e0044279e6590aca6c627db78ad673eb53a7f
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 10 14:08:06 2022 -0300

    sunrpc: Suppress clang warning on struct cmessage

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

diff --git a/sunrpc/svc_unix.c b/sunrpc/svc_unix.c
index 67177a2e78..8b136f4870 100644
--- a/sunrpc/svc_unix.c
+++ b/sunrpc/svc_unix.c
@@ -65,6 +65,7 @@
 #include <libintl.h>
 #include <wchar.h>
 #include <shlib-compat.h>
+#include <libc-diag.h>
 
 /*
  * Ops vector for AF_UNIX based rpc service handle
@@ -308,12 +309,18 @@ svcunix_destroy (SVCXPRT *xprt)
 }
 
 #ifdef SCM_CREDENTIALS
+/* clang complains if a flexible array member (struct cmsghdr) is not a the
+   end of the struct (since it is a GNU extension).  The __msgread explicit
+   expects that 'struct ucred' is after the 'cmsg', so disable the warning.  */
+DIAG_PUSH_NEEDS_COMMENT_CLANG;
+DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wgnu-variable-sized-type-not-at-end");
 struct cmessage {
   struct cmsghdr cmsg;
   struct ucred cmcred;
   /* hack to make sure we have enough memory */
   char dummy[(CMSG_ALIGN (sizeof (struct ucred)) - sizeof (struct ucred) + sizeof (long))];
 };
+DIAG_POP_NEEDS_COMMENT_CLANG;
 
 /* XXX This is not thread safe, but since the main functions in svc.c
    and the rpcgen generated *_svc functions for the daemon are also not


^ permalink raw reply	[flat|nested] 23+ messages in thread
* [glibc/azanella/clang] sunrpc: Suppress clang warning on struct cmessage
@ 2022-04-29 14:02 Adhemerval Zanella
  0 siblings, 0 replies; 23+ messages in thread
From: Adhemerval Zanella @ 2022-04-29 14:02 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=6268caaa6d776a12f2ef0b41d866417fbca4a432

commit 6268caaa6d776a12f2ef0b41d866417fbca4a432
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 10 14:08:06 2022 -0300

    sunrpc: Suppress clang warning on struct cmessage

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

diff --git a/sunrpc/svc_unix.c b/sunrpc/svc_unix.c
index 67177a2e78..8b136f4870 100644
--- a/sunrpc/svc_unix.c
+++ b/sunrpc/svc_unix.c
@@ -65,6 +65,7 @@
 #include <libintl.h>
 #include <wchar.h>
 #include <shlib-compat.h>
+#include <libc-diag.h>
 
 /*
  * Ops vector for AF_UNIX based rpc service handle
@@ -308,12 +309,18 @@ svcunix_destroy (SVCXPRT *xprt)
 }
 
 #ifdef SCM_CREDENTIALS
+/* clang complains if a flexible array member (struct cmsghdr) is not a the
+   end of the struct (since it is a GNU extension).  The __msgread explicit
+   expects that 'struct ucred' is after the 'cmsg', so disable the warning.  */
+DIAG_PUSH_NEEDS_COMMENT_CLANG;
+DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wgnu-variable-sized-type-not-at-end");
 struct cmessage {
   struct cmsghdr cmsg;
   struct ucred cmcred;
   /* hack to make sure we have enough memory */
   char dummy[(CMSG_ALIGN (sizeof (struct ucred)) - sizeof (struct ucred) + sizeof (long))];
 };
+DIAG_POP_NEEDS_COMMENT_CLANG;
 
 /* XXX This is not thread safe, but since the main functions in svc.c
    and the rpcgen generated *_svc functions for the daemon are also not


^ permalink raw reply	[flat|nested] 23+ messages in thread
* [glibc/azanella/clang] sunrpc: Suppress clang warning on struct cmessage
@ 2022-04-04 12:52 Adhemerval Zanella
  0 siblings, 0 replies; 23+ messages in thread
From: Adhemerval Zanella @ 2022-04-04 12:52 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=26e90ceb4cdc8c20a45613de45b6fd051c5d5043

commit 26e90ceb4cdc8c20a45613de45b6fd051c5d5043
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 10 14:08:06 2022 -0300

    sunrpc: Suppress clang warning on struct cmessage

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

diff --git a/sunrpc/svc_unix.c b/sunrpc/svc_unix.c
index 67177a2e78..8b136f4870 100644
--- a/sunrpc/svc_unix.c
+++ b/sunrpc/svc_unix.c
@@ -65,6 +65,7 @@
 #include <libintl.h>
 #include <wchar.h>
 #include <shlib-compat.h>
+#include <libc-diag.h>
 
 /*
  * Ops vector for AF_UNIX based rpc service handle
@@ -308,12 +309,18 @@ svcunix_destroy (SVCXPRT *xprt)
 }
 
 #ifdef SCM_CREDENTIALS
+/* clang complains if a flexible array member (struct cmsghdr) is not a the
+   end of the struct (since it is a GNU extension).  The __msgread explicit
+   expects that 'struct ucred' is after the 'cmsg', so disable the warning.  */
+DIAG_PUSH_NEEDS_COMMENT_CLANG;
+DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wgnu-variable-sized-type-not-at-end");
 struct cmessage {
   struct cmsghdr cmsg;
   struct ucred cmcred;
   /* hack to make sure we have enough memory */
   char dummy[(CMSG_ALIGN (sizeof (struct ucred)) - sizeof (struct ucred) + sizeof (long))];
 };
+DIAG_POP_NEEDS_COMMENT_CLANG;
 
 /* XXX This is not thread safe, but since the main functions in svc.c
    and the rpcgen generated *_svc functions for the daemon are also not


^ permalink raw reply	[flat|nested] 23+ messages in thread
* [glibc/azanella/clang] sunrpc: Suppress clang warning on struct cmessage
@ 2022-03-31 19:05 Adhemerval Zanella
  0 siblings, 0 replies; 23+ messages in thread
From: Adhemerval Zanella @ 2022-03-31 19:05 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=61635d8fcad9796af62d2ce4d0fdb155c59a35f6

commit 61635d8fcad9796af62d2ce4d0fdb155c59a35f6
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 10 14:08:06 2022 -0300

    sunrpc: Suppress clang warning on struct cmessage

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

diff --git a/sunrpc/svc_unix.c b/sunrpc/svc_unix.c
index 67177a2e78..8b136f4870 100644
--- a/sunrpc/svc_unix.c
+++ b/sunrpc/svc_unix.c
@@ -65,6 +65,7 @@
 #include <libintl.h>
 #include <wchar.h>
 #include <shlib-compat.h>
+#include <libc-diag.h>
 
 /*
  * Ops vector for AF_UNIX based rpc service handle
@@ -308,12 +309,18 @@ svcunix_destroy (SVCXPRT *xprt)
 }
 
 #ifdef SCM_CREDENTIALS
+/* clang complains if a flexible array member (struct cmsghdr) is not a the
+   end of the struct (since it is a GNU extension).  The __msgread explicit
+   expects that 'struct ucred' is after the 'cmsg', so disable the warning.  */
+DIAG_PUSH_NEEDS_COMMENT_CLANG;
+DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wgnu-variable-sized-type-not-at-end");
 struct cmessage {
   struct cmsghdr cmsg;
   struct ucred cmcred;
   /* hack to make sure we have enough memory */
   char dummy[(CMSG_ALIGN (sizeof (struct ucred)) - sizeof (struct ucred) + sizeof (long))];
 };
+DIAG_POP_NEEDS_COMMENT_CLANG;
 
 /* XXX This is not thread safe, but since the main functions in svc.c
    and the rpcgen generated *_svc functions for the daemon are also not


^ permalink raw reply	[flat|nested] 23+ messages in thread
* [glibc/azanella/clang] sunrpc: Suppress clang warning on struct cmessage
@ 2022-03-29 20:28 Adhemerval Zanella
  0 siblings, 0 replies; 23+ messages in thread
From: Adhemerval Zanella @ 2022-03-29 20:28 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=5a447c7631dc4b08fdca60ce58701c16188f9cad

commit 5a447c7631dc4b08fdca60ce58701c16188f9cad
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 10 14:08:06 2022 -0300

    sunrpc: Suppress clang warning on struct cmessage

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

diff --git a/sunrpc/svc_unix.c b/sunrpc/svc_unix.c
index 67177a2e78..8b136f4870 100644
--- a/sunrpc/svc_unix.c
+++ b/sunrpc/svc_unix.c
@@ -65,6 +65,7 @@
 #include <libintl.h>
 #include <wchar.h>
 #include <shlib-compat.h>
+#include <libc-diag.h>
 
 /*
  * Ops vector for AF_UNIX based rpc service handle
@@ -308,12 +309,18 @@ svcunix_destroy (SVCXPRT *xprt)
 }
 
 #ifdef SCM_CREDENTIALS
+/* clang complains if a flexible array member (struct cmsghdr) is not a the
+   end of the struct (since it is a GNU extension).  The __msgread explicit
+   expects that 'struct ucred' is after the 'cmsg', so disable the warning.  */
+DIAG_PUSH_NEEDS_COMMENT_CLANG;
+DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wgnu-variable-sized-type-not-at-end");
 struct cmessage {
   struct cmsghdr cmsg;
   struct ucred cmcred;
   /* hack to make sure we have enough memory */
   char dummy[(CMSG_ALIGN (sizeof (struct ucred)) - sizeof (struct ucred) + sizeof (long))];
 };
+DIAG_POP_NEEDS_COMMENT_CLANG;
 
 /* XXX This is not thread safe, but since the main functions in svc.c
    and the rpcgen generated *_svc functions for the daemon are also not


^ permalink raw reply	[flat|nested] 23+ messages in thread
* [glibc/azanella/clang] sunrpc: Suppress clang warning on struct cmessage
@ 2022-03-16 18:01 Adhemerval Zanella
  0 siblings, 0 replies; 23+ messages in thread
From: Adhemerval Zanella @ 2022-03-16 18:01 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=03ec014fc98b53dd99f4f4a7c73956e084cfc27d

commit 03ec014fc98b53dd99f4f4a7c73956e084cfc27d
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 10 14:08:06 2022 -0300

    sunrpc: Suppress clang warning on struct cmessage

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

diff --git a/sunrpc/svc_unix.c b/sunrpc/svc_unix.c
index 67177a2e78..8b136f4870 100644
--- a/sunrpc/svc_unix.c
+++ b/sunrpc/svc_unix.c
@@ -65,6 +65,7 @@
 #include <libintl.h>
 #include <wchar.h>
 #include <shlib-compat.h>
+#include <libc-diag.h>
 
 /*
  * Ops vector for AF_UNIX based rpc service handle
@@ -308,12 +309,18 @@ svcunix_destroy (SVCXPRT *xprt)
 }
 
 #ifdef SCM_CREDENTIALS
+/* clang complains if a flexible array member (struct cmsghdr) is not a the
+   end of the struct (since it is a GNU extension).  The __msgread explicit
+   expects that 'struct ucred' is after the 'cmsg', so disable the warning.  */
+DIAG_PUSH_NEEDS_COMMENT_CLANG;
+DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wgnu-variable-sized-type-not-at-end");
 struct cmessage {
   struct cmsghdr cmsg;
   struct ucred cmcred;
   /* hack to make sure we have enough memory */
   char dummy[(CMSG_ALIGN (sizeof (struct ucred)) - sizeof (struct ucred) + sizeof (long))];
 };
+DIAG_POP_NEEDS_COMMENT_CLANG;
 
 /* XXX This is not thread safe, but since the main functions in svc.c
    and the rpcgen generated *_svc functions for the daemon are also not


^ permalink raw reply	[flat|nested] 23+ messages in thread
* [glibc/azanella/clang] sunrpc: Suppress clang warning on struct cmessage
@ 2022-03-11 17:22 Adhemerval Zanella
  0 siblings, 0 replies; 23+ messages in thread
From: Adhemerval Zanella @ 2022-03-11 17:22 UTC (permalink / raw)
  To: glibc-cvs

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

commit 8f140c3baa8272dabae0725168dd72c4c2bf1f2d
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 10 14:08:06 2022 -0300

    sunrpc: Suppress clang warning on struct cmessage

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

diff --git a/sunrpc/svc_unix.c b/sunrpc/svc_unix.c
index 67177a2e78..8b136f4870 100644
--- a/sunrpc/svc_unix.c
+++ b/sunrpc/svc_unix.c
@@ -65,6 +65,7 @@
 #include <libintl.h>
 #include <wchar.h>
 #include <shlib-compat.h>
+#include <libc-diag.h>
 
 /*
  * Ops vector for AF_UNIX based rpc service handle
@@ -308,12 +309,18 @@ svcunix_destroy (SVCXPRT *xprt)
 }
 
 #ifdef SCM_CREDENTIALS
+/* clang complains if a flexible array member (struct cmsghdr) is not a the
+   end of the struct (since it is a GNU extension).  The __msgread explicit
+   expects that 'struct ucred' is after the 'cmsg', so disable the warning.  */
+DIAG_PUSH_NEEDS_COMMENT_CLANG;
+DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wgnu-variable-sized-type-not-at-end");
 struct cmessage {
   struct cmsghdr cmsg;
   struct ucred cmcred;
   /* hack to make sure we have enough memory */
   char dummy[(CMSG_ALIGN (sizeof (struct ucred)) - sizeof (struct ucred) + sizeof (long))];
 };
+DIAG_POP_NEEDS_COMMENT_CLANG;
 
 /* XXX This is not thread safe, but since the main functions in svc.c
    and the rpcgen generated *_svc functions for the daemon are also not


^ permalink raw reply	[flat|nested] 23+ messages in thread
* [glibc/azanella/clang] sunrpc: Suppress clang warning on struct cmessage
@ 2022-03-10 19:21 Adhemerval Zanella
  0 siblings, 0 replies; 23+ messages in thread
From: Adhemerval Zanella @ 2022-03-10 19:21 UTC (permalink / raw)
  To: glibc-cvs

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

commit e3e26b4fbc057197273c9cd1015fe150ffeb176d
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 10 14:08:06 2022 -0300

    sunrpc: Suppress clang warning on struct cmessage

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

diff --git a/sunrpc/svc_unix.c b/sunrpc/svc_unix.c
index 67177a2e78..8b136f4870 100644
--- a/sunrpc/svc_unix.c
+++ b/sunrpc/svc_unix.c
@@ -65,6 +65,7 @@
 #include <libintl.h>
 #include <wchar.h>
 #include <shlib-compat.h>
+#include <libc-diag.h>
 
 /*
  * Ops vector for AF_UNIX based rpc service handle
@@ -308,12 +309,18 @@ svcunix_destroy (SVCXPRT *xprt)
 }
 
 #ifdef SCM_CREDENTIALS
+/* clang complains if a flexible array member (struct cmsghdr) is not a the
+   end of the struct (since it is a GNU extension).  The __msgread explicit
+   expects that 'struct ucred' is after the 'cmsg', so disable the warning.  */
+DIAG_PUSH_NEEDS_COMMENT_CLANG;
+DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wgnu-variable-sized-type-not-at-end");
 struct cmessage {
   struct cmsghdr cmsg;
   struct ucred cmcred;
   /* hack to make sure we have enough memory */
   char dummy[(CMSG_ALIGN (sizeof (struct ucred)) - sizeof (struct ucred) + sizeof (long))];
 };
+DIAG_POP_NEEDS_COMMENT_CLANG;
 
 /* XXX This is not thread safe, but since the main functions in svc.c
    and the rpcgen generated *_svc functions for the daemon are also not


^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2024-02-09 17:29 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-15 18:38 [glibc/azanella/clang] sunrpc: Suppress clang warning on struct cmessage Adhemerval Zanella
  -- strict thread matches above, loose matches on Subject: below --
2024-02-09 17:29 Adhemerval Zanella
2024-02-07 14:05 Adhemerval Zanella
2024-01-29 17:55 Adhemerval Zanella
2023-12-21 18:52 Adhemerval Zanella
2023-09-28 17:50 Adhemerval Zanella
2023-08-30 12:35 Adhemerval Zanella
2023-02-09 19:47 Adhemerval Zanella
2022-10-28 17:40 Adhemerval Zanella
2022-10-04 12:57 Adhemerval Zanella
2022-06-09 21:18 Adhemerval Zanella
2022-06-09 13:15 Adhemerval Zanella
2022-06-03 14:04 Adhemerval Zanella
2022-05-13 14:18 Adhemerval Zanella
2022-05-12 19:32 Adhemerval Zanella
2022-05-10 18:22 Adhemerval Zanella
2022-04-29 14:02 Adhemerval Zanella
2022-04-04 12:52 Adhemerval Zanella
2022-03-31 19:05 Adhemerval Zanella
2022-03-29 20:28 Adhemerval Zanella
2022-03-16 18:01 Adhemerval Zanella
2022-03-11 17:22 Adhemerval Zanella
2022-03-10 19:21 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).