From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-x231.google.com (mail-pg0-x231.google.com [IPv6:2607:f8b0:400e:c05::231]) (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 0D2A98204A for ; Thu, 15 Dec 2016 22:47:34 -0800 (PST) Received: by mail-pg0-x231.google.com with SMTP id 3so28959954pgd.0 for ; Thu, 15 Dec 2016 22:47:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=JO/snbxyNhPJ8eSVj8gwUWGW5zuZLSrdzsAk0IdHr7o=; b=d3X08aaBTE7WwEght50YUUs4THgbcPBGDxd0nsvOG0LGanmFA3HToaqJPvD1EBvAu+ pW0XVvYOcq8JliJdiK7Lki07e9dDMZ7DI5kfSDBbrPLj4Q18QIWdayfUjPgntX4w0Mz6 sCHlCwM3/fi/IViDkazuht38ooQYcf6RdwL1U= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=JO/snbxyNhPJ8eSVj8gwUWGW5zuZLSrdzsAk0IdHr7o=; b=Ae6PwSOM5xGKvV+6siDcwIS+ymuvOLo4yJSe6xJgpm856mAnnSJpbzYdyfP7Ue++jF WScHP05aS+aeBIx2EM6xz1bx4IMQHTLrzkn2zWtDJW5+4qRQXKDIbctl7KEh1ws+SG30 +HafeggYqdY9jan2R8EeGGbixtZABMgqcoeUQ4NZw3YZUMvIEY7OVGtJ3om/hEGYpYp/ tGCxa2/NjlAIL9oijku0QQ+3e+uJwGhO+puqVtHO0utGAptJZ3tVPZS3fHkoKXOf7sDI tGURphHvYxZve1vHSSlYwovSnFjtPV8IXf60WdErGY/dbYbnBHJZdHdiySjW+HfreW0q mNXg== X-Gm-Message-State: AKaTC02Z4RcrxuuCAHgaL1o6hkjuECth0GQjiUt8s6MUcNI5SfHqdD2CydXKDeBfXu8pFyve X-Received: by 10.98.198.85 with SMTP id m82mr1532060pfg.69.1481870853226; Thu, 15 Dec 2016 22:47:33 -0800 (PST) Received: from [10.229.36.249] ([119.145.15.121]) by smtp.gmail.com with ESMTPSA id i76sm8848814pfk.89.2016.12.15.22.47.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Dec 2016 22:47:32 -0800 (PST) To: "Gao, Liming" , "edk2-devel@lists.01.org" References: <1481784588-35336-1-git-send-email-heyi.guo@linaro.org> <4A89E2EF3DFEDB4C8BFDE51014F606A14D6B0D8B@shsmsx102.ccr.corp.intel.com> From: Heyi Guo Message-ID: <3bd29fa1-29b5-19b3-45fb-99ee67f982dd@linaro.org> Date: Fri, 16 Dec 2016 14:47:16 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <4A89E2EF3DFEDB4C8BFDE51014F606A14D6B0D8B@shsmsx102.ccr.corp.intel.com> Subject: Re: [PATCH 0/4] Fix GCC build warnings for BaseTools 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: Fri, 16 Dec 2016 06:47:34 -0000 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit That's great; many thanks, Liming! Heyi 在 12/16/2016 12:53 PM, Gao, Liming 写道: > Heyi: > Thanks for your fix. The patch 1~3 are good to me. The patch 4 is not necessary. We can disable this warning like other C tools. I will provide the patch for it. For the remaining C tool issue, we will look it. > > ../support/set/set.c:557:2: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘size_t’ [-Wformat=] > > Thanks > Liming >> -----Original Message----- >> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of >> Heyi Guo >> Sent: Thursday, December 15, 2016 2:50 PM >> To: edk2-devel@lists.01.org >> Cc: Heyi Guo >> Subject: [edk2] [PATCH 0/4] Fix GCC build warnings for BaseTools >> >> There are 28 warnings when I build BaseTools using gcc (version 4.8.4 >> (Ubuntu 4.8.4-2ubuntu1~14.04.3)). Below patches are to fix these build >> warnings. I don't have a visual studio environment to test the build; >> sorry for not testing the patches entirely. >> >> There are still 10 warnings which I'm not very clear how to fix; could >> anyone please help to fix them: >> >> ../support/set/set.c:557:2: warning: format ‘%d’ expects argument of type >> ‘int’, but argument 3 has type ‘size_t’ [-Wformat=] >> VfrSyntax.g, line 1830: warning: predicate: LT(i) missing, bad, or with i=0; >> assuming i=1 >> VfrSyntax.g, line 1835: warning: predicate: LT(i) missing, bad, or with i=0; >> assuming i=1 >> VfrSyntax.g, line 3266: warning: alts 1 and 2 of {..} ambiguous upon ( ";" >> RefreshGuid GuidOp Locked Image EndIf InconsistentIf DisableIf SuppressIf >> Default GrayOutIf ) >> VfrSyntax.g, line 3275: warning: alts 1 and 2 of {..} ambiguous upon ( ";" >> RefreshGuid GuidOp Locked Image EndIf InconsistentIf DisableIf SuppressIf >> Default GrayOutIf ) >> VfrSyntax.g, line 3284: warning: alts 1 and 2 of {..} ambiguous upon ( ";" >> RefreshGuid GuidOp Locked Image EndIf InconsistentIf DisableIf SuppressIf >> Default GrayOutIf ) >> VfrSyntax.g, line 3294: warning: alts 1 and 2 of {..} ambiguous upon ( ";" >> RefreshGuid GuidOp Locked Image EndIf InconsistentIf DisableIf SuppressIf >> Default GrayOutIf ) >> VfrSyntax.g, line 3324: warning: alts 1 and 2 of {..} ambiguous upon ( ";" >> RefreshGuid GuidOp Locked Image EndIf InconsistentIf DisableIf SuppressIf >> Default GrayOutIf ) >> VfrSyntax.g, line 3333: warning: alts 1 and 2 of {..} ambiguous upon ( ";" >> RefreshGuid GuidOp Locked Image EndIf InconsistentIf DisableIf SuppressIf >> Default GrayOutIf ) >> ../support/set/set.c:557:2: warning: format ‘%d’ expects argument of type >> ‘int’, but argument 3 has type ‘size_t’ [-Wformat=] >> >> Heyi Guo (4): >> BaseTools: fix format-security build warnings >> BaseTools: fix format type build warnings >> BaseTools: fix write-strings build warnings >> BaseTools: fix unused-result build warnings >> >> BaseTools/Source/C/VfrCompile/Pccts/antlr/bits.c | 16 ++++++++-------- >> BaseTools/Source/C/VfrCompile/Pccts/antlr/fset2.c | 2 +- >> BaseTools/Source/C/VfrCompile/Pccts/antlr/gen.c | 6 +++--- >> BaseTools/Source/C/VfrCompile/Pccts/antlr/lex.c | 8 ++++---- >> BaseTools/Source/C/VfrCompile/VfrFormPkg.cpp | 2 +- >> BaseTools/Source/C/VfrCompile/VfrUtilityLib.cpp | 4 +++- >> 6 files changed, 20 insertions(+), 18 deletions(-) >> >> -- >> 1.9.1 >> >> _______________________________________________ >> edk2-devel mailing list >> edk2-devel@lists.01.org >> https://lists.01.org/mailman/listinfo/edk2-devel