From patchwork Thu Dec 15 06:49:48 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: gary guo X-Patchwork-Id: 88118 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp630906qgi; Wed, 14 Dec 2016 22:51:45 -0800 (PST) X-Received: by 10.99.253.85 with SMTP id m21mr1548228pgj.38.1481784705862; Wed, 14 Dec 2016 22:51:45 -0800 (PST) Return-Path: Received: from ml01.01.org (ml01.01.org. [2001:19d0:306:5::1]) by mx.google.com with ESMTPS id c128si960755pfb.26.2016.12.14.22.51.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Dec 2016 22:51:45 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) client-ip=2001:19d0:306:5::1; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 9117781EB2; Wed, 14 Dec 2016 22:51:45 -0800 (PST) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received: from mail-pf0-x22b.google.com (mail-pf0-x22b.google.com [IPv6:2607:f8b0:400e:c00::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 5765A81E0C for ; Wed, 14 Dec 2016 22:51:44 -0800 (PST) Received: by mail-pf0-x22b.google.com with SMTP id 189so7680141pfz.3 for ; Wed, 14 Dec 2016 22:51:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=fHVq/peErvqHZZrjQVxd3KH28O5Dh49LIJp3vi3NDJ0=; b=eOVLjkAoadLd57wzXL0pu20lzObJ7vJ9Gw7RrxorAICyvJ2iQdf5NSFyKxK03XJrfh ganXdG9bsTnFeo6mN+zKH3sFF/s6SVsX76HLgjq2ohK9H3v7TK445i952p7OdAZMlf35 YVb/nDYDtTYwvdhbCTACuhjkQXgle/6JXuOio= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=fHVq/peErvqHZZrjQVxd3KH28O5Dh49LIJp3vi3NDJ0=; b=amqak6xw7U7pbdAu5KEfLPl5q6od12R9tYOkHmS1D78hpdutKMa9NU3oBdFthhnntU nxpJ8dh+beKFgaRuCohpkA+4OJwWz6TEeKHyA3O3wHeLW0e178DUqS3VI7hW4r6taEul Qo9hb/dGIyinmymanK7YC5pVwdZzWhXqvkhHKLbzjyruCQQip9CzrtkhE5MOhxhb7Y4i l8iv7PbIOnJoskQZ/nlGDVzZUCm48F3sTZyuTnQgHnAHGGeiME7uBbmA6P7lE1fXvaZu HVWqJsutSsealD6zGggmmdVKgkyQlsW48a8KcjWaMesQGiocK8GmiQ0rCWyxlugd+iSU yc8A== X-Gm-Message-State: AKaTC017AXIDqFTFeZOGEhll/m5gL965bGugdcw6McslojJgeNOUpdbelUV0VjkRra0cUelq X-Received: by 10.99.141.193 with SMTP id z184mr1491447pgd.23.1481784703888; Wed, 14 Dec 2016 22:51:43 -0800 (PST) Received: from localhost.localdomain ([119.145.15.121]) by smtp.gmail.com with ESMTPSA id y89sm1377007pfk.83.2016.12.14.22.51.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 14 Dec 2016 22:51:43 -0800 (PST) From: Heyi Guo To: edk2-devel@lists.01.org Date: Thu, 15 Dec 2016 14:49:48 +0800 Message-Id: <1481784588-35336-5-git-send-email-heyi.guo@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1481784588-35336-1-git-send-email-heyi.guo@linaro.org> References: <1481784588-35336-1-git-send-email-heyi.guo@linaro.org> MIME-Version: 1.0 Subject: [edk2] [PATCH 4/4] BaseTools: fix unused-result build warnings X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Heyi Guo , Liming Gao Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" Fix build warnings of "ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]" for BaseTools, while using "gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.3)". Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Heyi Guo Cc: Yonghong Zhu Cc: Liming Gao --- BaseTools/Source/C/VfrCompile/VfrUtilityLib.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/BaseTools/Source/C/VfrCompile/VfrUtilityLib.cpp b/BaseTools/Source/C/VfrCompile/VfrUtilityLib.cpp index 3ca57ed..0ba7102 100644 --- a/BaseTools/Source/C/VfrCompile/VfrUtilityLib.cpp +++ b/BaseTools/Source/C/VfrCompile/VfrUtilityLib.cpp @@ -3395,7 +3395,9 @@ CVfrStringDB::GetVarStoreNameFormStringId ( fclose (pInFile); return NULL; } - fread ((char *)StringPtr, sizeof (UINT8), Length, pInFile); + // Fix GCC build warning for ignoring return value + unsigned long TempResult = fread ((char *)StringPtr, sizeof (UINT8), Length, pInFile); + (void)TempResult; fclose (pInFile); PkgHeader = (EFI_HII_STRING_PACKAGE_HDR *) StringPtr;