From: kernel test robot <lkp@intel.com>
To: David Howells <dhowells@redhat.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: [dhowells-fs:crypto-krb5 23/33] net/rxrpc/output.c:918:6: warning: variable 'serial' is used uninitialized whenever 'if' condition is true
Date: Sat, 1 Feb 2025 01:18:56 +0800 [thread overview]
Message-ID: <202502010148.H1FR0nxe-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git crypto-krb5
head: 3108d67c535aa3ea00a95b1daf8efdc15bb074b4
commit: 097df55e65b4cf8449dd5ae95fb43e55220e0c8d [23/33] rxrpc: Pass CHALLENGE packets to the call for recvmsg() to respond to
config: x86_64-buildonly-randconfig-005-20250131 (https://download.01.org/0day-ci/archive/20250201/202502010148.H1FR0nxe-lkp@intel.com/config)
compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250201/202502010148.H1FR0nxe-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202502010148.H1FR0nxe-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> net/rxrpc/output.c:918:6: warning: variable 'serial' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
918 | if (ret < 0)
| ^~~~~~~
net/rxrpc/output.c:951:38: note: uninitialized use occurs here
951 | trace_rxrpc_tx_fail(conn->debug_id, serial, ret,
| ^~~~~~
net/rxrpc/output.c:918:2: note: remove the 'if' if its condition is always false
918 | if (ret < 0)
| ^~~~~~~~~~~~
919 | goto fail;
| ~~~~~~~~~
net/rxrpc/output.c:911:12: note: initialize the variable 'serial' to silence this warning
911 | u32 serial;
| ^
| = 0
1 warning generated.
vim +918 net/rxrpc/output.c
899
900 /*
901 * Send a RESPONSE message.
902 */
903 void rxrpc_send_response(struct rxrpc_connection *conn, struct sk_buff *response)
904 {
905 struct rxrpc_skb_priv *sp = rxrpc_skb(response);
906 struct scatterlist sg[16];
907 struct bio_vec bvec[16];
908 struct msghdr msg;
909 size_t len = sp->resp.len;
910 __be32 wserial;
911 u32 serial;
912 int ret, nr_sg;
913
914 _enter("C=%x,%x", conn->debug_id, sp->resp.challenge_serial);
915
916 sg_init_table(sg, ARRAY_SIZE(sg));
917 ret = skb_to_sgvec(response, sg, 0, len);
> 918 if (ret < 0)
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2025-01-31 17:19 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=202502010148.H1FR0nxe-lkp@intel.com \
--to=lkp@intel.com \
--cc=dhowells@redhat.com \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
/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