]> Gentwo Git Trees - linux/.git/commit
selftest: af_unix: Silence -Wflex-array-member-not-at-end warning for scm_rights.c.
authorKuniyuki Iwashima <kuniyu@google.com>
Mon, 11 Aug 2025 21:53:06 +0000 (21:53 +0000)
committerJakub Kicinski <kuba@kernel.org>
Wed, 13 Aug 2025 01:01:53 +0000 (18:01 -0700)
commit9a58d8e68252af07138a2530a22f081ef0b070c1
tree98d48e820700b3a512a6e0e72d8f72e0e0fdc392
parent942224e6baca0d1bdd1801e935f3544f2df37baf
selftest: af_unix: Silence -Wflex-array-member-not-at-end warning for scm_rights.c.

scm_rights.c has no problem in functionality, but when compiled with
-Wflex-array-member-not-at-end, it shows this warning:

scm_rights.c: In function ‘__send_fd’:
scm_rights.c:275:32: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
  275 |                 struct cmsghdr cmsghdr;
      |                                ^~~~~~~

Let's silence it.

Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com>
Link: https://patch.msgid.link/20250811215432.3379570-4-kuniyu@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/net/af_unix/scm_rights.c