Joe: Can you clarify your usage about GLOBAL_REMOVE_IF_UNREFERENCED? With this change, the warning of unused variable will not be reported if the unused variable with this attribute. Is it right?
Thanks Liming 发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 JoeX Lu 发送时间: 2023年4月28日 13:54 收件人: Pedro Falcato <pedro.falc...@gmail.com>; devel@edk2.groups.io 主题: Re: [edk2-devel] [PATCH] Support GLOBAL_REMOVE_IF_UNREFERENCED in GCC5/11 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 (#103970): https://edk2.groups.io/g/devel/message/103970 Mute This Topic: https://groups.io/mt/98679176/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-