Commit 9597544
libnvme/json: check write return value for build warnings
Since the following build warnings output.
[61/232] Compiling C object libnvme/src/libnvme-test.so.p/nvme_json.c.o
../libnvme/src/nvme/json.c: In function ‘json_update_config’:
../libnvme/src/nvme/json.c:438:9: warning: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
438 | write(fd, "\n", 1);
| ^~~~~~~~~~~~~~~~~~
[62/232] Compiling C object libnvme/src/libnvme.so.3.0.0.p/nvme_json.c.o
../libnvme/src/nvme/json.c: In function ‘json_update_config’:
../libnvme/src/nvme/json.c:438:9: warning: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
438 | write(fd, "\n", 1);
| ^~~~~~~~~~~~~~~~~~
Fixes: 74b30d2 ("json: update nvme_dump_config to a file descriptor")
Signed-off-by: Tokunori Ikegami <[email protected]>1 parent a781044 commit 9597544
1 file changed
Lines changed: 2 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
435 | 435 | | |
436 | 436 | | |
437 | 437 | | |
438 | | - | |
439 | | - | |
| 438 | + | |
440 | 439 | | |
441 | | - | |
| 440 | + | |
442 | 441 | | |
443 | 442 | | |
444 | 443 | | |
| |||
0 commit comments