summaryrefslogtreecommitdiffstats
path: root/CREDITS
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2017-07-14 14:06:54 +0200
committerMartin K. Petersen <martin.petersen@oracle.com>2017-08-07 14:04:01 -0400
commit875826a71c8b5ef9b7cc830dc61fa83d01016e5c (patch)
tree67ea82a147fd7dc42397e67ea27fd7d6e6dc69e2 /CREDITS
parenta7ec87a9a01a70e545ed3681a3a2a96680b5fe6f (diff)
downloadop-kernel-dev-875826a71c8b5ef9b7cc830dc61fa83d01016e5c.zip
op-kernel-dev-875826a71c8b5ef9b7cc830dc61fa83d01016e5c.tar.gz
scsi: megaraid: fix format-overflow warning
gcc-7 complains that the firmware version strings might overflow for some values: drivers/scsi/megaraid.c: In function 'megaraid_probe_one': drivers/scsi/megaraid.c:314:33: error: '%d' directive writing between 1 and 2 bytes into a region of size between 1 and 2 [-Werror=format-overflow=] drivers/scsi/megaraid.c:314:33: note: directive argument in the range [0, 15] drivers/scsi/megaraid.c:314:3: note: 'sprintf' output between 7 and 9 bytes into a destination of size 7 drivers/scsi/megaraid.c:320:35: error: '%d' directive writing between 1 and 2 bytes into a region of size between 1 and 2 [-Werror=format-overflow=] drivers/scsi/megaraid.c:320:35: note: directive argument in the range [0, 15] drivers/scsi/megaraid.c:320:3: note: 'sprintf' output between 7 and 9 bytes into a destination of size 7 This makes the code use a truncating snprintf() instead, which shuts up that warning. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'CREDITS')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud