mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org
Subject: cmsg_sender.c:149:36: warning: excess elements in struct initializer
Date: Tue, 19 Jul 2022 18:39:02 +0800	[thread overview]
Message-ID: <202207191852.s2Owu7Iz-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   ca85855bdcae8f84f1512e88b4c75009ea17ea2f
commit: 4d397424a5e0e130d5e8d0023776f0aa2e791f51 selftests: net: cmsg_sender: support setting SO_TXTIME
date:   5 months ago
reproduce: make O=/tmp/kselftest -C tools/testing/selftests

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   cmsg_sender.c: In function 'cs_write_cmsg':
   cmsg_sender.c:148:24: error: variable 'so_txtime' has initializer but incomplete type
     148 |                 struct sock_txtime so_txtime = {
         |                        ^~~~~~~~~~~
   cmsg_sender.c:149:26: error: 'struct sock_txtime' has no member named 'clockid'
     149 |                         .clockid = CLOCK_MONOTONIC,
         |                          ^~~~~~~
>> cmsg_sender.c:149:36: warning: excess elements in struct initializer
     149 |                         .clockid = CLOCK_MONOTONIC,
         |                                    ^~~~~~~~~~~~~~~
   cmsg_sender.c:149:36: note: (near initialization for 'so_txtime')
   cmsg_sender.c:148:36: error: storage size of 'so_txtime' isn't known
     148 |                 struct sock_txtime so_txtime = {
         |                                    ^~~~~~~~~
   cmsg_sender.c:153:48: error: 'SO_TXTIME' undeclared (first use in this function)
     153 |                 if (setsockopt(fd, SOL_SOCKET, SO_TXTIME,
         |                                                ^~~~~~~~~
   cmsg_sender.c:153:48: note: each undeclared identifier is reported only once for each function it appears in
   cmsg_sender.c:167:35: error: 'SCM_TXTIME' undeclared (first use in this function)
     167 |                 cmsg->cmsg_type = SCM_TXTIME;
         |                                   ^~~~~~~~~~
>> cmsg_sender.c:148:36: warning: unused variable 'so_txtime' [-Wunused-variable]
     148 |                 struct sock_txtime so_txtime = {
         |                                    ^~~~~~~~~

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

                 reply	other threads:[~2022-07-19 10:39 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202207191852.s2Owu7Iz-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.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

all inboxes | Powered by JetHome®