public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "JoeX Lu" <pen-chunx.lu@intel.com>
To: Pedro Falcato <pedro.falcato@gmail.com>,devel@edk2.groups.io
Subject: Re: [edk2-devel] [PATCH] Support GLOBAL_REMOVE_IF_UNREFERENCED in GCC5/11
Date: Thu, 27 Apr 2023 22:53:33 -0700	[thread overview]
Message-ID: <5976.1682661213578501091@groups.io> (raw)
In-Reply-To: <CAKbZUD1w7Rh69ygtZmoQ9RGm-_G37DRqYh8xt5BH5goMYTNq=A@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 559 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 1289 bytes --]

  reply	other threads:[~2023-04-28  5:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-28  2:46 [PATCH] Support GLOBAL_REMOVE_IF_UNREFERENCED in GCC5/11 JoeX Lu
2023-04-28  4:46 ` [edk2-devel] " Pedro Falcato
2023-04-28  5:53   ` JoeX Lu [this message]
2023-05-04  6:58     ` 回复: " gaoliming
2023-05-05  0:04       ` [edk2-devel] " JoeX Lu
2023-05-05  3:15         ` 回复: " gaoliming
2023-05-05  4:47           ` [edk2-devel] " JoeX Lu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5976.1682661213578501091@groups.io \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox