public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Heyi Guo <heyi.guo@linaro.org>
To: edk2-devel@lists.01.org
Cc: Heyi Guo <heyi.guo@linaro.org>
Subject: [PATCH 0/4] Fix GCC build warnings for BaseTools
Date: Thu, 15 Dec 2016 14:49:44 +0800	[thread overview]
Message-ID: <1481784588-35336-1-git-send-email-heyi.guo@linaro.org> (raw)

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



             reply	other threads:[~2016-12-15  6:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-15  6:49 Heyi Guo [this message]
2016-12-15  6:49 ` [PATCH 1/4] BaseTools: fix format-security build warnings Heyi Guo
2016-12-15  6:49 ` [PATCH 2/4] BaseTools: fix format type " Heyi Guo
2016-12-15  6:49 ` [PATCH 3/4] BaseTools: fix write-strings " Heyi Guo
2016-12-15  6:49 ` [PATCH 4/4] BaseTools: fix unused-result " Heyi Guo
2016-12-16  4:53 ` [PATCH 0/4] Fix GCC build warnings for BaseTools Gao, Liming
2016-12-16  6:47   ` Heyi Guo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1481784588-35336-1-git-send-email-heyi.guo@linaro.org \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox