From a87657aa3f1e3d80cd47d682558cf8f2ee2c8ec6 Mon Sep 17 00:00:00 2001 From: Keith Busch Date: Sat, 21 Dec 2019 02:15:36 +0900 Subject: [PATCH] micron: don't ignore 'system()' return value Some compilers will generate warnings that this return value can't be ignored. Signed-off-by: Keith Busch --- plugins/micron/micron-nvme.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/micron/micron-nvme.c b/plugins/micron/micron-nvme.c index ff191571..82408870 100644 --- a/plugins/micron/micron-nvme.c +++ b/plugins/micron/micron-nvme.c @@ -73,7 +73,7 @@ static int ZipAndRemoveDir(char *strDirName, char *strFileName) } exit_status: - (void)system("rm -f temp.txt"); + err = system("rm -f temp.txt"); return err; } @@ -960,7 +960,8 @@ static void GetOSConfig(const char *strOSDirName) } strcpy(strTemp, cmdArray[i].strCommand); sprintf(strBuffer, strTemp, strFileName); - (void)system(strBuffer); + if (system(strBuffer)) + fprintf(stderr, "Failed to send \"%s\"\n", strBuffer); } } -- 2.50.1