[if gte mso 9]>

Re: [edk2] BaseTools compilation error

Subject: Re: [edk2] BaseTools compilation error

From: "Gao, Liming" <liming.gao@intel.com>

To: "edk2-devel@lists.sourceforge.net" <edk2-devel@lists.sourceforge.net>

Date: 2013-09-22 13:09:49

Hi,

  I don’t find such issue on GCC44 and GCC45.

 

  Do you modify BaseTools Compiler option? Or you use the different GCC version?

 

Thanks

Liming

From: Sergey Isakov [mailto:isakov-sl@bk.ru]
Sent: Saturday, September 21, 2013 4:49 PM
To: edk2-devel@lists.sourceforge.net
Subject: Re: [edk2] BaseTools compilation error

 

Next

--------------

g++ -c -DPCCTS_USE_NAMESPACE_STD -I Pccts/h -I .. -I ../Include/Common -I ../Include/ -I ../Include/IndustryStandard -I ../Common/ -I .. -I . -I ../Include/X64/   VfrSyntax.cpp -o VfrSyntax.o

VfrSyntax.cpp:56:3: warning: control reaches end of non-void function [-Wreturn-type]

  }

  ^

VfrSyntax.cpp:3543:88: warning: expression result unused [-Wunused-value]

  ...) {zzfailed_pred("  mCompatibleMode",0 /* report */, { 0; /* no user action */ } );}

                                                            ^

Pccts/h/AParser.h:340:44: note: expanded from macro 'zzfailed_pred'

    zzfailed_pred_action(_p,_hasuseraction,_useraction) \

                                           ^

Pccts/h/AParser.h:351:27: note: expanded from macro 'zzfailed_pred_action'

    if (_hasuseraction) { _useraction } else { failedSemanticPredicate(_p); }

                          ^

VfrSyntax.cpp:3564:88: warning: expression result unused [-Wunused-value]

  ...) {zzfailed_pred("  mCompatibleMode",0 /* report */, { 0; /* no user action */ } );}

                                                            ^

Pccts/h/AParser.h:340:44: note: expanded from macro 'zzfailed_pred'

    zzfailed_pred_action(_p,_hasuseraction,_useraction) \

                                           ^

Pccts/h/AParser.h:351:27: note: expanded from macro 'zzfailed_pred_action'

    if (_hasuseraction) { _useraction } else { failedSemanticPredicate(_p); }

                          ^

3 warnings generated.

g++  -I Pccts/h -I .. -I ../Include/Common -I ../Include/ -I ../Include/IndustryStandard -I ../Common/ -I .. -I . -I ../Include/X64/   -c -o VfrFormPkg.o VfrFormPkg.cpp

VfrFormPkg.cpp:98:13: error: addition of default argument on redeclaration makes this

      constructor a default constructor

  IN UINT32 BufferSize = 4096

            ^            ~~~~

./VfrFormPkg.h:127:3: note: previous declaration is here

  CFormPkg (IN UINT32 BufferSize);

  ^

1 error generated.

make[1]: *** [VfrFormPkg.o] Error 1

make: *** [VfrCompile] Error 2

 

---------------

 

 

On 21.09.2013, at 12:43, Sergey Isakov <isakov-sl@bk.ru> wrote:



In addition, what to do here?

--------------

gcc  -c -MD -fshort-wchar -fno-strict-aliasing -nostdlib -Wall -Werror -c -g  -I .. -I ../Include/Common -I ../Include/ -I ../Include/IndustryStandard -I ../Common/ -I .. -I . -I ../Include/X64/  LzmaCompress.c -o LzmaCompress.o

LzmaCompress.c:46:48: error: explicitly assigning a variable of type 'void *' to itself

      [-Werror,-Wself-assign]

static void *SzAlloc(void *p, size_t size) { p = p; return MyAlloc(size); }

                                             ~ ^ ~

LzmaCompress.c:47:48: error: explicitly assigning a variable of type 'void *' to itself

      [-Werror,-Wself-assign]

static void SzFree(void *p, void *address) { p = p; MyFree(address); }

                                             ~ ^ ~

2 errors generated.

make[1]: *** [LzmaCompress.o] Error 1

make: *** [LzmaCompress] Error 2

 

---------------

 

On 21.09.2013, at 12:38, Sergey Isakov <isakov-sl@bk.ru> wrote:



Dear sirs,

Please consider

---------------------

make -C GenVtf

gcc  -c -MD -fshort-wchar -fno-strict-aliasing -nostdlib -Wall -Werror -c -g  -I .. -I ../Include/Common -I ../Include/ -I ../Include/IndustryStandard -I ../Common/ -I .. -I . -I ../Include/X64/  GenVtf.c -o GenVtf.o

GenVtf.c:1725:20: error: comparison of unsigned expression >= 0 is always true

      [-Werror,-Wtautological-compare]

  if ((BaseAddress >= 0) && (FwVolSize > 0x40) && ((BaseAddress + FwVolSize) % 8 == 0)) {

       ~~~~~~~~~~~ ^  ~

1 error generated.

make[1]: *** [GenVtf.o] Error 1

 

----------------------

May be (BaseAddress != 0) ?

 

Sergey

------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/22/13.
http://pubads.g.doubleclick.net/gampad/clk?id=64545871&iu=/4140/ostg.clktrk_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

 

------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/22/13.
http://pubads.g.doubleclick.net/gampad/clk?id=64545871&iu=/4140/ostg.clktrk_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel