提交 5a01e99f 编写于 作者: K Kirill A. Shutemov 提交者: Anthony Liguori

net/slirp.c: fix warning with _FORTIFY_SOURCE

CC    net/slirp.o
cc1: warnings being treated as errors
net/slirp.c: In function 'slirp_smb_cleanup':
net/slirp.c:470: error: ignoring return value of 'system', declared with attribute warn_unused_result
make: *** [net/slirp.o] Error 1
Signed-off-by: NKirill A. Shutemov <kirill@shutemov.name>
Signed-off-by: NJuan Quintela <quintela@redhat.com>
Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
上级 db89119d
......@@ -464,10 +464,17 @@ int net_slirp_redir(const char *redir_str)
static void slirp_smb_cleanup(SlirpState *s)
{
char cmd[128];
int ret;
if (s->smb_dir[0] != '\0') {
snprintf(cmd, sizeof(cmd), "rm -rf %s", s->smb_dir);
system(cmd);
ret = system(cmd);
if (!WIFEXITED(ret)) {
qemu_error("'%s' failed.\n", cmd);
} else if (WEXITSTATUS(ret)) {
qemu_error("'%s' failed. Error code: %d\n",
cmd, WEXITSTATUS(ret));
}
s->smb_dir[0] = '\0';
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册