diff options
| author | Arnd Bergmann <arnd@arndb.de> | 2016-10-25 22:21:04 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-02-25 11:03:50 +0100 |
| commit | 6420c014ed9c9f34ea0b0dd9889f7deb55aeba5b (patch) | |
| tree | ae7d2849669fbe6cfda006bd2c69f8b038f5e174 /tools/perf/scripts/python | |
| parent | 30ddc36cb7651907c6cefcf19d4f7abe21815c9f (diff) | |
cw1200: fix bogus maybe-uninitialized warning
commit 7fc1503c906f0fac62d3506a6e993e49fb996248 upstream.
On x86, the cw1200 driver produces a rather silly warning about the
possible use of the 'ret' variable without an initialization
presumably after being confused by the architecture specific definition
of WARN_ON:
drivers/net/wireless/st/cw1200/wsm.c: In function ‘wsm_handle_rx’:
drivers/net/wireless/st/cw1200/wsm.c:1457:9: error: ‘ret’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
We have already checked that 'count' is larger than 0 here, so
we know that 'ret' is initialized. Changing the 'for' loop
into do/while also makes this clear to the compiler.
Suggested-by: David Laight <David.Laight@ACULAB.COM>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
