Re: [PATCH 00/35] Use more of GLib's macros

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Oct 15, 2019 at 10:40:35AM +0200, Michal Privoznik wrote:
On 10/14/19 3:15 PM, Ján Tomko wrote:
We do not need to define MIN and MAX if we include glib.h
and it also provides some macros for __attribute__'s

Ján Tomko (35):
  util: remove MIN and MAX macros
  apibuild: ignore GLib macros too
  use G_GNUC_NORETURN instead of ATTRIBUTE_NORETURN
  use G_GNUC_NULL_TERMINATED instead of ATTRIBUTE_SENTINEL
  Use G_GNUC_WARN_UNUSED_RESULT instead of ATTRIBUTE_RETURN_CHECK
  examples: use G_GNUC_UNUSED
  access: use G_GNUC_UNUSED
  admin: use G_GNUC_UNUSED
  bhyve: use G_GNUC_UNUSED
  conf: use G_GNUC_UNUSED
  cpu: use G_GNUC_UNUSED
  esx: use G_GNUC_UNUSED
  libxl: use G_GNUC_UNUSED
  locking: use G_GNUC_UNUSED
  logging: use G_GNUC_UNUSED
  lxc: use G_GNUC_UNUSED
  network: use G_GNUC_UNUSED
  node_device: use G_GNUC_UNUSED
  nwfilter: use G_GNUC_UNUSED
  openvz: use G_GNUC_UNUSED
  qemu: use G_GNUC_UNUSED
  remote: use G_GNUC_UNUSED
  rpc: use G_GNUC_UNUSED
  security: use G_GNUC_UNUSED
  storage: use G_GNUC_UNUSED
  test: use G_GNUC_UNUSED
  tests: use G_GNUC_UNUSED
  tools: use G_GNUC_UNUSED
  util: use G_GNUC_UNUSED
  vbox: use G_GNUC_UNUSED
  vz: use G_GNUC_UNUSED
  Use G_GNUC_UNUSED everywhere
  syntax-check: check for G_GNUC_UNUSED instead of ATTRIBUTE_UNUSED
  gendispatch: generate G_GNUC_UNUSED instead of ATTRIBUTE_UNUSED
  internal: remove no longer used ATTRIBUTE macros


[...]

 370 files changed, 3672 insertions(+), 3710 deletions(-)


Reviewed-by: Michal Privoznik <mprivozn@xxxxxxxxxx>

I've identified other macros of ours that might be worth converting too:

 ATTRIBUTE_FALLTHROUGH

G_GNUC_FALLTHROUGH was introduced in GLib 2.60 so not yet

 ATTRIBUTE_FMT_PRINTF

Right, I missed G_GNUC_PRINTF - thought there is only the G_GNUC_FORMAT
variant that only takes one argument

 ATTRIBUTE_FORMAT

We stopped using ATTRIBUTE_FORMAT in 2009:
commit 899ae0d2b52a560ac67104b4ba2f234bfada9df7

 ATTRIBUTE_NOINLINE

G_GNUC_NO_INLINE was introduced by GLib 2.58

 ATTRIBUTE_NONNULL

I did not find a GLib equivalent here. Also, we define it to nothing
unless compiling for static analysis.

 ATTRIBUTE_PACKED

No GLib equivalent either.

 ATTRIBUTE_RETURN_CHECK
 ATTRIBUTE_SENTINEL
 ATTRIBUTE_UNUSED

These were handled by this series.

Jano


Michal

Attachment: signature.asc
Description: PGP signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux