I have another proposition.
Define new type
typedef ENUM INT32;
it will conform to UEFI and compatible with C language specification. :)
And then as I proposed
> #define EfiACPIMemoryNVS  0x0A

> and so on.

On 11.01.2013, at 11:58, Tim Lewis wrote:

> Sergey –
>  
> It is an enum in the UEFI specification.
>  
> Why not just remove the second comparison? Since the enum is an int (for UEFI 
> cases), if it is more than or equal to EfiMaxMemoryType, it must be less than 
> 0x7fffffff (if it is an int). Otherwise it would be less than 0.
>  
> Tim
>  
> From: Sergey Isakov [mailto:isakov...@bk.ru] 
> Sent: Thursday, January 10, 2013 11:54 PM
> To: edk2-devel@lists.sourceforge.net
> Subject: [edk2] clang compilation error
>  
> Hi,
> with clang 3.3 one has the follow
> ----------
> /edk2/MdeModulePkg/Core/Dxe/Mem/Pool.c:188:49: error: comparison of constant 
> 2147483647 with expression of type 'EFI_MEMORY_TYPE' is always true 
> [-Werror,-Wtautological-constant-out-of-range-compare]
>   if ((PoolType >= EfiMaxMemoryType && PoolType <= 0x7fffffff) ||
>                                        ~~~~~~~~ ^  ~~~~~~~~~~
> 1 error generated.
> ----------
> Again, it is enum and sholud not be compared.
> I will propose to make this as UINT32 and change enum list by a set of 
> definitions like
> #define EfiACPIMemoryNVS  0x0A
>  
> It will be better then mix enum and integer.
> ------------------------------------------------------------------------------
> Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and
> much more. Get web development skills now with LearnDevNow -
> 350+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
> SALE $99.99 this month only -- learn more at:
> http://p.sf.net/sfu/learnmore_122812_______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/edk2-devel

------------------------------------------------------------------------------
Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and
much more. Get web development skills now with LearnDevNow -
350+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122812
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to