[edk2-devel] [PATCH] Support GLOBAL_REMOVE_IF_UNREFERENCED in GCC5/11

JoeX Lu pen-chunx.lu at intel.com
Fri Apr 28 05:53:33 UTC 2023


Hi Pedro,
Thanks for your comment.

I hope this attribute can silent Wunused in GCC build.

Because it will be nice to declaim GLOBAL_REMOVE_IF_UNREFERENCED before unusd variable than #ifdef

example1:

#ifdef (UNUSED_CONDITION)

static Boolean samplvariable; // which will be triggered the Wunused warning message in GCC

#endif

example2:

GLOBAL_REMOVE_IF_UNREFERENCED static Boolean samplvariable; // which will be triggered the Wunused warning message in GCC

I think example2 will be better than example1.

Best Regards,

Joe Lu


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#103753): https://edk2.groups.io/g/devel/message/103753
Mute This Topic: https://groups.io/mt/98551348/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/edk2-devel-archive/attachments/20230427/8571cc04/attachment-0001.htm>


More information about the edk2-devel-archive mailing list