From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from walk.intel-email.com (walk.intel-email.com [101.227.64.242]) by mx.groups.io with SMTP id smtpd.web11.43650.1683183535167320841 for ; Wed, 03 May 2023 23:58:56 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@byosoft.com.cn header.s=cloud-union header.b=CPJp08Yk; spf=pass (domain: byosoft.com.cn, ip: 101.227.64.242, mailfrom: gaoliming@byosoft.com.cn) Received: from walk.intel-email.com (localhost [127.0.0.1]) by walk.intel-email.com (Postfix) with ESMTP id B21F7CD1F679 for ; Thu, 4 May 2023 14:58:50 +0800 (CST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=byosoft.com.cn; s=cloud-union; t=1683183530; bh=U/Y/KB2vHcREGBnzzN1rWgij3SlX51nvyxdHqhuKtgI=; h=From:To:References:In-Reply-To:Subject:Date; b=CPJp08Yk02RNexoO8Tkf26bTu9ZGHKTuKpziDaa/Q7u78CBFVH1kiJvRIXQIsHs0L 6OKnZIGWsQMjYwLZexiQgqTox84sovFcvYGiU1yIcl3TB1VnipbozpD4mPHTH1ovje WRlAaHjGt9ELTbkJVOlO55qSKo46KPSunqVJJP7A= Received: from localhost (localhost [127.0.0.1]) by walk.intel-email.com (Postfix) with ESMTP id ADFF0CD1F66D for ; Thu, 4 May 2023 14:58:50 +0800 (CST) Received: from walk.intel-email.com (localhost [127.0.0.1]) by walk.intel-email.com (Postfix) with ESMTP id 7AECBCD1F64C for ; Thu, 4 May 2023 14:58:50 +0800 (CST) Authentication-Results: walk.intel-email.com; none Received: from mail.byosoft.com.cn (mail.byosoft.com.cn [58.240.74.242]) by walk.intel-email.com (Postfix) with SMTP id 43FC5CD1F670 for ; Thu, 4 May 2023 14:58:47 +0800 (CST) Received: from DESKTOPS6D0PVI ([58.246.60.130]) (envelope-sender ) by 192.168.6.13 with ESMTP for ; Thu, 04 May 2023 14:58:43 +0800 X-WM-Sender: gaoliming@byosoft.com.cn X-Originating-IP: 58.246.60.130 X-WM-AuthFlag: YES X-WM-AuthUser: gaoliming@byosoft.com.cn From: "gaoliming" To: , , "'Pedro Falcato'" References: <5976.1682661213578501091@groups.io> In-Reply-To: <5976.1682661213578501091@groups.io> Subject: =?UTF-8?B?5Zue5aSNOiBbZWRrMi1kZXZlbF0gW1BBVENIXSBTdXBwb3J0IEdMT0JBTF9SRU1PVkVfSUZfVU5SRUZFUkVOQ0VEIGluIEdDQzUvMTE=?= Date: Thu, 4 May 2023 14:58:46 +0800 Message-ID: <030e01d97e55$df79ed50$9e6dc7f0$@byosoft.com.cn> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQGUv7JRWgdAiPbQjnjN7JeKLI6nIQGskHPdr8XF4wA= Sender: "gaoliming" Content-Type: multipart/alternative; boundary="----=_NextPart_000_030F_01D97E98.ED9DF0A0" Content-Language: zh-cn ------=_NextPart_000_030F_01D97E98.ED9DF0A0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 v= ariable with this attribute. Is it right? =20 Thanks Liming =E5=8F=91=E4=BB=B6=E4=BA=BA: devel@edk2.groups.io = =E4=BB=A3=E8=A1=A8 JoeX Lu =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2023=E5=B9=B44=E6=9C=8828=E6=97=A5 13= :54 =E6=94=B6=E4=BB=B6=E4=BA=BA: Pedro Falcato ; devel= @edk2.groups.io =E4=B8=BB=E9=A2=98: Re: [edk2-devel] [PATCH] Support GLOBAL_REMOVE_IF_UNREF= ERENCED in GCC5/11 =20 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 u= nusd variable than #ifdef example1: =20 #ifdef (UNUSED_CONDITION) static Boolean samplvariable; // which will be triggered the Wunused war= ning message in GCC #endif example2: GLOBAL_REMOVE_IF_UNREFERENCED static Boolean samplvariable; // which wil= l be triggered the Wunused warning message in GCC I think example2 will be better than example1. =20 Best Regards, Joe Lu ------=_NextPart_000_030F_01D97E98.ED9DF0A0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Joe:

=C2=A0Can you clarify your usage about GLOBAL_REM= OVE_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

=E5=8F=91=E4=BB=B6=E4=BA=BA: devel@edk2.groups.io <devel@edk2.group= s.io> =E4=BB=A3=E8=A1=A8 JoeX Lu
=E5=8F=91=E9=80=81=E6=97= =B6=E9=97=B4: 2023=E5=B9=B44=E6=9C=8828=E6=97=A5 13:54
=E6=94=B6=E4=BB=B6=E4=BA=BA= : Pedro Falcato <pedro.falcato@gmail.com&g= t;; devel@edk2.groups.io
=E4=B8=BB=E9=A2=98= : Re: [edk2-devel] [PATCH] Support GLOBAL_REM= OVE_IF_UNREFERENCED in GCC5/11

 

Hi Pedro,
  Thanks for your comment= .

=C2=A0 I = hope this attribute can silent Wunused in GCC build.

<= p class=3DMsoPlainText>=C2=A0 Because it will be nice to= declaim GLOBAL_REMOVE_IF_UNREFERENCED before unusd variable than #ifdef

 example= 1:

 

#ifdef (UNUS= ED_CONDITION)

=C2=A0 static Boolean samplvariable;=C2=A0 // which will be triggered th= e Wunused warning message in GCC

#endif

<= span lang=3DEN-US>example2:

=C2=A0 GLOBAL_REMOVE_IF_UNREFERENCED=C2=A0 static Boolean = samplvariable; // which will be triggered the Wunused warning message in GC= C

=C2=A0 I = think example2 will be better than example1.

 

Best Regards,

Joe Lu

------=_NextPart_000_030F_01D97E98.ED9DF0A0--