]> www.infradead.org Git - users/sagi/nvme-cli.git/commit
fix build error due to asprintf()
authorMinwoo Im <minwoo.im@samsung.com>
Tue, 3 Sep 2019 01:12:09 +0000 (10:12 +0900)
committer임민우/MINWOOIM <minwoo.im@samsungds.net>
Tue, 3 Sep 2019 01:16:58 +0000 (10:16 +0900)
commit957f20345c4d3fa30650b61c06ee779c83d10000
treef6d70f9a139e1540780badd9f765b60d1cd0a64a
parent70501d661cdb62a6c6226c8bcd2274be3af61484
fix build error due to asprintf()

Fixes a3b3e93286a3 ("nvme-cli: Code reorg")

$ gcc -v
minwoo@minwoo-desktop:~/work/nvme-cli.git$ (fix-build-error-for-asprintf) gcc -v
...
gcc version 7.4.0 (Ubuntu 7.4.0-1ubuntu1~18.04.1)

nvme-print.c: In function ‘show_relatives’:
nvme-print.c:3964:3: error: ignoring return value of ‘asprintf’, declared with attribute warn_unused_result [-Werror=unused-result]
   asprintf(&path, "/sys/class/nvme/%s", name);
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
nvme-print.c:3968:3: error: ignoring return value of ‘asprintf’, declared with attribute warn_unused_result [-Werror=unused-result]
   asprintf(&path, "/sys/block/%s/device", name);
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Minwoo Im <minwoo.im@samsung.com>
nvme-print.c
nvme-topology.c