lkml.org 
[lkml]   [2020]   [Apr]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectnet/mptcp/pm_netlink.c:98:22: warning: The scope of the variable 'skc' can be reduced. [variableScope]
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 4c205c84e249e0a91dcfabe461d77667ec9b2d05
commit: 01cacb00b35cb62b139f07d5f84bcf0eeda8eff6 mptcp: add netlink-based PM
date: 6 days ago

If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>


cppcheck warnings: (new ones prefixed by >>)

>> net/mptcp/pm_netlink.c:98:22: warning: The scope of the variable 'skc' can be reduced. [variableScope]
>> struct sock_common *skc;
^

vim +/skc +98 net/mptcp/pm_netlink.c

92
93 static bool lookup_subflow_by_saddr(const struct list_head *list,
94 struct mptcp_addr_info *saddr)
95 {
96 struct mptcp_subflow_context *subflow;
97 struct mptcp_addr_info cur;
> 98 struct sock_common *skc;
99
100 list_for_each_entry(subflow, list, node) {
101 skc = (struct sock_common *)mptcp_subflow_tcp_sock(subflow);
102
103 local_address(skc, &cur);
104 if (addresses_equal(&cur, saddr, false))
105 return true;
106 }
107
108 return false;
109 }
110

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

\
 
 \ /
  Last update: 2020-04-05 12:41    [W:0.034 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site