]> www.infradead.org Git - users/sagi/nvme-cli.git/commit
nvme: fix compilation error
authorSagi Grimberg <sagi@grimberg.me>
Thu, 22 Aug 2019 21:31:32 +0000 (14:31 -0700)
committerKeith Busch <keith.busch@intel.com>
Thu, 22 Aug 2019 21:31:38 +0000 (15:31 -0600)
commit45ec6c6f14a07c3d903911044cffea5e51d687c7
treef78200f30b8516a0a2401653ab693aa1baf9a264
parentd01d6a8fe5b14601fef01161b6315927b66aa9c8
nvme: fix compilation error

gcc 7.4.0.

nvme.c: In function ‘print_relatives’:
nvme.c:3505:3: error: ignoring return value of ‘asprintf’, declared with attribute warn_unused_result [-Werror=unused-result]
   asprintf(&path, "/sys/class/nvme/%s", devicename);
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
nvme.c:3509:3: error: ignoring return value of ‘asprintf’, declared with attribute warn_unused_result [-Werror=unused-result]
   asprintf(&path, "/sys/block/%s/device", devicename);
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
Makefile:57: recipe for target 'nvme' failed
make: *** [nvme] Error 1

Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
nvme.c