From patchwork Sun Dec 20 01:39:19 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Kirill A . Shutemov" X-Patchwork-Id: 41496 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 9753FB6F18 for ; Sun, 20 Dec 2009 12:54:14 +1100 (EST) Received: from localhost ([127.0.0.1]:40870 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NMAzs-0005Sd-0q for incoming@patchwork.ozlabs.org; Sat, 19 Dec 2009 20:54:12 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NMAm4-00081a-Gv for qemu-devel@nongnu.org; Sat, 19 Dec 2009 20:39:56 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NMAly-0007u7-0E for qemu-devel@nongnu.org; Sat, 19 Dec 2009 20:39:55 -0500 Received: from [199.232.76.173] (port=54478 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NMAlx-0007tp-3D for qemu-devel@nongnu.org; Sat, 19 Dec 2009 20:39:49 -0500 Received: from mail-fx0-f222.google.com ([209.85.220.222]:56134) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NMAlw-0004ms-Oc for qemu-devel@nongnu.org; Sat, 19 Dec 2009 20:39:48 -0500 Received: by mail-fx0-f222.google.com with SMTP id 22so4042062fxm.2 for ; Sat, 19 Dec 2009 17:39:48 -0800 (PST) Received: by 10.223.57.22 with SMTP id a22mr984770fah.4.1261273188383; Sat, 19 Dec 2009 17:39:48 -0800 (PST) Received: from localhost.localdomain (a88-114-220-92.elisa-laajakaista.fi [88.114.220.92]) by mx.google.com with ESMTPS id 13sm6982256fks.45.2009.12.19.17.39.46 (version=SSLv3 cipher=RC4-MD5); Sat, 19 Dec 2009 17:39:47 -0800 (PST) From: "Kirill A. Shutemov" To: qemu-devel@nongnu.org Date: Sun, 20 Dec 2009 03:39:19 +0200 Message-Id: <1261273167-3240-10-git-send-email-kirill@shutemov.name> X-Mailer: git-send-email 1.6.5.6 In-Reply-To: <1261273167-3240-9-git-send-email-kirill@shutemov.name> References: <1261273167-3240-1-git-send-email-kirill@shutemov.name> <1261273167-3240-2-git-send-email-kirill@shutemov.name> <1261273167-3240-3-git-send-email-kirill@shutemov.name> <1261273167-3240-4-git-send-email-kirill@shutemov.name> <1261273167-3240-5-git-send-email-kirill@shutemov.name> <1261273167-3240-6-git-send-email-kirill@shutemov.name> <1261273167-3240-7-git-send-email-kirill@shutemov.name> <1261273167-3240-8-git-send-email-kirill@shutemov.name> <1261273167-3240-9-git-send-email-kirill@shutemov.name> X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Cc: "Kirill A. Shutemov" Subject: [Qemu-devel] [PATCH 10/18] net/slirp.c: fix warning with _FORTIFY_SOURCE X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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: Kirill A. Shutemov --- net/slirp.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/net/slirp.c b/net/slirp.c index 3f91c4b..1f16814 100644 --- a/net/slirp.c +++ b/net/slirp.c @@ -464,10 +464,15 @@ 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 (ret) { + qemu_error("'%s' failed. Error code: %d\n", cmd, ret); + /* abort() ? */ + } s->smb_dir[0] = '\0'; } }