Fixed build warning for ignoring return value 88/176288/1
authorhyunuktak <hyunuk.tak@samsung.com>
Wed, 18 Apr 2018 05:41:06 +0000 (14:41 +0900)
committerhyunuktak <hyunuk.tak@samsung.com>
Wed, 18 Apr 2018 05:41:11 +0000 (14:41 +0900)
Change-Id: I449b9e501ac7cc8b8d2a7876be75a442f5d69bcc
Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
test/stc_ipt_sys.c

index 64738ae..14a8ade 100755 (executable)
@@ -47,16 +47,15 @@ int stc_ipt_exe_cmd(const char *cmd)
                errno = 0;
                ret = execv(args[0], args);
                if (ret) {
-                       strerror_r(errno, err_buf, MAX_ERR_BUFFER);
-                       msg("Failed to exe cmd " LOG_RED "[%s]" LOG_END, err_buf);
+                       msg("Failed to exe cmd " LOG_RED "[%s]" LOG_END,
+                               strerror_r(errno, err_buf, MAX_ERR_BUFFER));
                        g_strfreev(args);
                }
                exit(ret);
        } else if (pid > 0) {
                if (waitpid(pid, &status, 0) < 0) {
-                       strerror_r(errno, err_buf, MAX_ERR_BUFFER);
                        msg("Can't wait for a pid " LOG_RED "[%d %d %s]" LOG_END,
-                               pid, status, err_buf);
+                               pid, status, strerror_r(errno, err_buf, MAX_ERR_BUFFER));
                        g_strfreev(args);
                        return STC_ERROR_INVALID_OPERATION;
                }
@@ -64,8 +63,8 @@ int stc_ipt_exe_cmd(const char *cmd)
                return STC_ERROR_NONE;
        }
 
-       strerror_r(errno, err_buf, MAX_ERR_BUFFER);
-       msg("Failed to fork " LOG_RED "[%s]" LOG_END, err_buf);
+       msg("Failed to fork " LOG_RED "[%s]" LOG_END,
+               strerror_r(errno, err_buf, MAX_ERR_BUFFER));
        g_strfreev(args);
 
        return STC_ERROR_OPERATION_FAILED;