summaryrefslogtreecommitdiff
path: root/net/llc/llc_s_ev.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2017-08-25 01:10:00 +0200
committerMartin K. Petersen <martin.petersen@oracle.com>2017-08-25 18:26:52 -0400
commit5fe5a6c9acc03bcd98e0d1611b6a0fe17149c6cc (patch)
tree9d2ae0336d0c519034223847530f834e3d790f91 /net/llc/llc_s_ev.c
parent7362617319fd2273c7fe5a5f8f8b5fb059a85015 (diff)
scsi: lpfc: avoid false-positive gcc-8 warning
This is an interesting regression with gcc-8, showing a harmless warning for correct code: In file included from include/linux/kernel.h:13:0, ... from drivers/scsi/lpfc/lpfc_debugfs.c:23: include/linux/printk.h:301:2: error: 'eq' may be used uninitialized in this function [-Werror=maybe-uninitialized] printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__) ^~~~~~ In file included from drivers/scsi/lpfc/lpfc_debugfs.c:58:0: drivers/scsi/lpfc/lpfc_debugfs.h:451:31: note: 'eq' was declared here I managed to reduce the warning into a small test case for gcc-8 that I reported in the gcc bugzilla[1]. As a workaround, this changes the logic to move the two assignments of 'eq' out of the conditions and instead make the index conditional. This works for all configurations I tried and avoids adding a bogus initialization. Acked-by: James Smart <james.smart@broadcom.com> Link: [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81958 Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'net/llc/llc_s_ev.c')
0 files changed, 0 insertions, 0 deletions