Commit a032a48
nvme: fix compiler warnings
This patch fixes the following errors :-
nvme-topology.c: In function ‘verify_legacy_ns’:
nvme-topology.c:361:32: error: format not a string literal and no format arguments [-Werror=format-security]
361 | asprintf(&n->ctrl->address, tmp_address);
| ^~~~~~~~~~~
nvme-topology.c:360:4: error: ignoring return value of ‘asprintf’, declared with attribute warn_unused_result [-Werror=unused-result]
360 | asprintf(&n->ctrl->transport, "pcie");
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
nvme-topology.c:361:4: error: ignoring return value of ‘asprintf’, declared with attribute warn_unused_result [-Werror=unused-result]
361 | asprintf(&n->ctrl->address, tmp_address);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make: *** [Makefile:96: nvme-topology.o] Error 1
This can be easily re produced on the gcc version :-
(Ubuntu 9.2.1-9ubuntu2) 9.2.1 20191008
Signed-off-by: Chaitanya Kulkarni <[email protected]>1 parent f51db58 commit a032a48
1 file changed
+4
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
357 | 357 | | |
358 | 358 | | |
359 | 359 | | |
360 | | - | |
361 | | - | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
362 | 364 | | |
363 | 365 | | |
364 | 366 | | |
| |||
0 commit comments