diff options
author | Arnd Bergmann <arnd@arndb.de> | 2019-04-08 23:26:18 +0200 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2019-04-11 13:37:30 +0200 |
commit | 913140e221567b3ecd21b4242257a7e3fa279026 (patch) | |
tree | bf5f48d20602d583d953aabff411f6063c756d4b /drivers/thermal/clock_cooling.c | |
parent | s390: avoid __builtin_return_address(n) on clang (diff) | |
download | linux-913140e221567b3ecd21b4242257a7e3fa279026.tar.xz linux-913140e221567b3ecd21b4242257a7e3fa279026.zip |
s390: zcrypt: initialize variables before_use
The 'func_code' variable gets printed in debug statements without
a prior initialization in multiple functions, as reported when building
with clang:
drivers/s390/crypto/zcrypt_api.c:659:6: warning: variable 'func_code' is used uninitialized whenever 'if' condition is true
[-Wsometimes-uninitialized]
if (mex->outputdatalength < mex->inputdatalength) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/s390/crypto/zcrypt_api.c:725:29: note: uninitialized use occurs here
trace_s390_zcrypt_rep(mex, func_code, rc,
^~~~~~~~~
drivers/s390/crypto/zcrypt_api.c:659:2: note: remove the 'if' if its condition is always false
if (mex->outputdatalength < mex->inputdatalength) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/s390/crypto/zcrypt_api.c:654:24: note: initialize the variable 'func_code' to silence this warning
unsigned int func_code;
^
Add initializations to all affected code paths to shut up the warning
and make the warning output consistent.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/thermal/clock_cooling.c')
0 files changed, 0 insertions, 0 deletions