From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 Cc: Heyi Guo , Yonghong Zhu , Liming Gao 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: [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: , X-List-Received-Date: Thu, 15 Dec 2016 06:51:44 -0000 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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; -- 1.9.1