Commit 9c576e7
wdc: fix muon build warning
Change the string length to 41 from 40 for the warning below.
[165/166] linking unit/test-uint128
../plugins/wdc/wdc-nvme.c: In function 'wdc_print_unsupported_reqs_log_json':
../plugins/wdc/wdc-nvme.c:5381:71: warning: 'sprintf' may write a terminating nul past the end of the destination [-Wformat-overflow=]
sprintf((char *)unsup_req_list_str, "Unsupported Requirement List %d", j);
^
../plugins/wdc/wdc-nvme.c:5381:3: note: 'sprintf' output between 31 and 41 bytes into a destination of size 40
sprintf((char *)unsup_req_list_str, "Unsupported Requirement List %d", j);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Tokunori Ikegami <[email protected]>1 parent 5cf7282 commit 9c576e7
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5374 | 5374 | | |
5375 | 5375 | | |
5376 | 5376 | | |
5377 | | - | |
| 5377 | + | |
5378 | 5378 | | |
5379 | | - | |
| 5379 | + | |
5380 | 5380 | | |
5381 | 5381 | | |
5382 | 5382 | | |
| |||
0 commit comments