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-boun...@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 <heyi....@linaro.org>
> 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
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to