]> git.ipfire.org Git - thirdparty/iw.git/commit - iw.c
iw: 'idby' might be used uninitialized in main function
authorOmer Dagan <omer.dagan@tandemg.com>
Sun, 22 Jul 2018 14:44:36 +0000 (17:44 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 14 Aug 2018 11:21:35 +0000 (13:21 +0200)
commit8a2dfd51ff9ea8f493933a9184c61a8ee7e73dd1
treedf9bda27b064e5053bdf72c1674326e60ca46ca3
parent6ab936f0458c62b1de3a5af8af8d9a3b092cbfac
iw: 'idby' might be used uninitialized in main function

During static-analysis of the code, a message appeared stating that
'idby' enum might be used un-initialized.
It described a case in which the 'goto detect' statment occurred and
that means that the enum initialization will be skipped.

Johannes: just move the initialization after the label, instead
of moving the variable as Omer's patch had it since we always
just want it to be II_NONE to start with and don't need it in
any other scope.

Signed-off-by: Omer Dagan <omer.dagan@tandemg.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
iw.c