From: xie xingguo Date: Wed, 4 Jan 2017 01:54:48 +0000 (+0800) Subject: common: get rid of "warning: ignoring return value of ‘strerror_r’" X-Git-Tag: v12.0.0~286^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=3bd8422b057d022134fc17620f348815fd0fafd7;p=ceph-ci.git common: get rid of "warning: ignoring return value of ‘strerror_r’" Signed-off-by: xie xingguo --- diff --git a/src/common/module.c b/src/common/module.c index efe484574ea..b251274a5f1 100644 --- a/src/common/module.c +++ b/src/common/module.c @@ -10,6 +10,7 @@ * */ +#include "acconfig.h" #include #include #include @@ -40,7 +41,12 @@ static int run_command(const char *command) if (status < 0) { char error_buf[80]; +#ifdef STRERROR_R_CHAR_P + char* dummy = strerror_r(errno, error_buf, sizeof(error_buf)); + (void)dummy; +#else strerror_r(errno, error_buf, sizeof(error_buf)); +#endif fprintf(stderr, "couldn't run '%s': %s\n", command, error_buf); } else if (WIFSIGNALED(status)) {