netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* selftests: connector: proc_filter.c:48:20: error: invalid application of 'sizeof' to an incomplete type 'struct proc_input'
@ 2023-07-25 13:05 Naresh Kamboju
  2023-07-25 16:48 ` Anjali Kulkarni
  0 siblings, 1 reply; 11+ messages in thread
From: Naresh Kamboju @ 2023-07-25 13:05 UTC (permalink / raw)
  To: open list:KERNEL SELFTEST FRAMEWORK, open list, lkft-triage,
	Netdev, clang-built-linux
  Cc: Anjali Kulkarni, Shuah Khan, Anders Roxell, David S. Miller,
	Liam R. Howlett

selftests: connector: proc_filter build failed with clang-16 due to below
warnings / errors on Linux next-20230725.

Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>

clang --target=aarch64-linux-gnu -fintegrated-as
-Werror=unknown-warning-option -Werror=ignored-optimization-argument
-Werror=option-ignored -Werror=unused-command-line-argument
--target=aarch64-linux-gnu -fintegrated-as -Wall     proc_filter.c  -o
/home/tuxbuild/.cache/tuxmake/builds/1/build/kselftest/connector/proc_filter
proc_filter.c:42:12: error: invalid application of 'sizeof' to an
incomplete type 'struct proc_input'
        char buff[NL_MESSAGE_SIZE];
                  ^~~~~~~~~~~~~~~
proc_filter.c:22:5: note: expanded from macro 'NL_MESSAGE_SIZE'
                         sizeof(struct proc_input))
                         ^     ~~~~~~~~~~~~~~~~~~~
proc_filter.c:42:12: note: forward declaration of 'struct proc_input'
proc_filter.c:22:19: note: expanded from macro 'NL_MESSAGE_SIZE'
                         sizeof(struct proc_input))
                                       ^
proc_filter.c:48:20: error: invalid application of 'sizeof' to an
incomplete type 'struct proc_input'
                hdr->nlmsg_len = NL_MESSAGE_SIZE;
                                 ^~~~~~~~~~~~~~~
proc_filter.c:22:5: note: expanded from macro 'NL_MESSAGE_SIZE'
                         sizeof(struct proc_input))
                         ^     ~~~~~~~~~~~~~~~~~~~
proc_filter.c:42:12: note: forward declaration of 'struct proc_input'
        char buff[NL_MESSAGE_SIZE];
                  ^
proc_filter.c:22:19: note: expanded from macro 'NL_MESSAGE_SIZE'
                         sizeof(struct proc_input))
                                       ^
proc_filter.c:64:14: error: invalid application of 'sizeof' to an
incomplete type 'struct proc_input'
                msg->len = sizeof(struct proc_input);
                           ^     ~~~~~~~~~~~~~~~~~~~
proc_filter.c:42:12: note: forward declaration of 'struct proc_input'
        char buff[NL_MESSAGE_SIZE];
                  ^
proc_filter.c:22:19: note: expanded from macro 'NL_MESSAGE_SIZE'
                         sizeof(struct proc_input))
                                       ^
proc_filter.c:65:35: error: incomplete definition of type 'struct proc_input'
                ((struct proc_input *)msg->data)->mcast_op =
                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
proc_filter.c:42:12: note: forward declaration of 'struct proc_input'
        char buff[NL_MESSAGE_SIZE];
                  ^
proc_filter.c:22:19: note: expanded from macro 'NL_MESSAGE_SIZE'
                         sizeof(struct proc_input))
                                       ^
proc_filter.c:66:31: error: incomplete definition of type 'struct proc_input'
                        ((struct proc_input *)pinp)->mcast_op;
                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~^
proc_filter.c:42:12: note: forward declaration of 'struct proc_input'
        char buff[NL_MESSAGE_SIZE];
                  ^
proc_filter.c:22:19: note: expanded from macro 'NL_MESSAGE_SIZE'
                         sizeof(struct proc_input))
                                       ^
proc_filter.c:67:35: error: incomplete definition of type 'struct proc_input'
                ((struct proc_input *)msg->data)->event_type =
                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
proc_filter.c:42:12: note: forward declaration of 'struct proc_input'
        char buff[NL_MESSAGE_SIZE];
                  ^
proc_filter.c:22:19: note: expanded from macro 'NL_MESSAGE_SIZE'
                         sizeof(struct proc_input))
                                       ^
proc_filter.c:68:31: error: incomplete definition of type 'struct proc_input'
                        ((struct proc_input *)pinp)->event_type;
                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~^
proc_filter.c:42:12: note: forward declaration of 'struct proc_input'
        char buff[NL_MESSAGE_SIZE];
                  ^
proc_filter.c:22:19: note: expanded from macro 'NL_MESSAGE_SIZE'
                         sizeof(struct proc_input))
                                       ^
proc_filter.c:245:20: error: variable has incomplete type 'struct proc_input'
        struct proc_input input;
                          ^
proc_filter.c:245:9: note: forward declaration of 'struct proc_input'
        struct proc_input input;
               ^
proc_filter.c:264:22: error: use of undeclared identifier
'PROC_EVENT_NONZERO_EXIT'
                input.event_type = PROC_EVENT_NONZERO_EXIT;
                                   ^
9 errors generated.
make[4]: Leaving directory '/builds/linux/tools/testing/selftests/connector'



Links:
 - https://storage.tuxsuite.com/public/linaro/lkft/builds/2T3676HpK243gMBLYJCp4OXDmWl/

steps to reproduce:
 - https://storage.tuxsuite.com/public/linaro/lkft/builds/2T3676HpK243gMBLYJCp4OXDmWl/tuxmake_reproducer.sh
--
Linaro LKFT
https://lkft.linaro.org

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

end of thread, other threads:[~2023-07-28 18:13 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-25 13:05 selftests: connector: proc_filter.c:48:20: error: invalid application of 'sizeof' to an incomplete type 'struct proc_input' Naresh Kamboju
2023-07-25 16:48 ` Anjali Kulkarni
2023-07-27 17:34   ` Anjali Kulkarni
2023-07-28  0:43     ` Shuah Khan
2023-07-28  1:38       ` Anjali Kulkarni
2023-07-28  2:43         ` Jakub Kicinski
2023-07-28 16:46           ` Anjali Kulkarni
2023-07-28 17:34             ` Shuah Khan
2023-07-28 18:08               ` Anjali Kulkarni
2023-07-28 17:33         ` Shuah Khan
2023-07-28 18:13           ` Anjali Kulkarni

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 NNTP newsgroup(s).