From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-x234.google.com (mail-pg0-x234.google.com [IPv6:2607:f8b0:400e:c05::234]) (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 307DC81E0C for ; Wed, 14 Dec 2016 22:51:23 -0800 (PST) Received: by mail-pg0-x234.google.com with SMTP id x23so16920734pgx.1 for ; Wed, 14 Dec 2016 22:51:23 -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:mime-version :content-transfer-encoding; bh=5NXC980u/I/3EFsC0R/XtR8jL9+IsfAGggZwGAgOabg=; b=A1h/PEgmDRo8LutiyaE23m6p1ZwfDLSteIn/g9I5lRYBKglRgM81S00GzQY5b8Y+hm UD43uPJdcSaKLUkISxTtTo6UQMMt6ZoqIGzZ/MifIT60//OzKlaQaYRdpuQ+oc+7WbWy Y8hJec/AOQg51surpRjSWFWJ4YNBjaK8bSdzU= 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:mime-version :content-transfer-encoding; bh=5NXC980u/I/3EFsC0R/XtR8jL9+IsfAGggZwGAgOabg=; b=hw8PBYl8h1iElrNAlyuEwedD1vbm6MkMKlfJTW2nlr+j6BBWTlFjno6MLoUJ10sxPj f2k8Gdml24ODDW3i8pNOYXJh8gCYMk7EJ0zCFtBWfPzGWvIL5KOFIFnnxhhGHaALLF+j KrScG7mCoJ5KJcnHj3O1XwtaFHKOLZkosnI4UZ77WC8NydFoCYPXLSk3TVCUSWg2gDmz vQj1V5LSulvS1AVqHxY5NQeL9p3VT1IEypOhGUQsVFMj88gwV4WnozyapGWD4jY0DALa /9Ix/vmSZd0Jn3rNb3mODdx1Jmz5LZzEw1w7Q/asnbfzmgCyEAmoRGJXn7sutmFVBCtc Lbvw== X-Gm-Message-State: AKaTC007BcM3luSVuMO+9AJ3TKQRa18iculqeQqOJEFV+LGb1oEd3nbtZnEiIXk4MOW5t9oq X-Received: by 10.99.242.5 with SMTP id v5mr1405068pgh.181.1481784682706; Wed, 14 Dec 2016 22:51:22 -0800 (PST) Received: from localhost.localdomain ([119.145.15.121]) by smtp.gmail.com with ESMTPSA id y89sm1377007pfk.83.2016.12.14.22.51.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 14 Dec 2016 22:51:22 -0800 (PST) From: Heyi Guo To: edk2-devel@lists.01.org Cc: Heyi Guo Date: Thu, 15 Dec 2016 14:49:44 +0800 Message-Id: <1481784588-35336-1-git-send-email-heyi.guo@linaro.org> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 Subject: [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: Thu, 15 Dec 2016 06:51:23 -0000 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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