]> git.ipfire.org Git - thirdparty/libvirt.git/commit
util: squelch G_DEFINE_TYPE volatile warnings with GCC 11
authorDaniel P. Berrangé <berrange@redhat.com>
Thu, 3 Dec 2020 11:33:29 +0000 (11:33 +0000)
committerDaniel P. Berrangé <berrange@redhat.com>
Thu, 3 Dec 2020 15:01:43 +0000 (15:01 +0000)
commit9801f91a8eacec32950b0bf094aba45e891f63e6
treeb905469e96800fd3de88a19b70a4175ed3f88a97
parentd4745bb909ff9e7172cca5967932d8fbb0011a3f
util: squelch G_DEFINE_TYPE volatile warnings with GCC 11

In this previous commit:

  commit 65491a2dfe00bfcf9f09a8d6eab60234b56c8cc4
  Author: Martin Kletzander <mkletzan@redhat.com>
  Date:   Thu Nov 12 13:58:53 2020 +0100

    Do not disable incompatible-pointer-types-discards-qualifiers

We selectively rewrite G_DEFINE_TYPE to avoid warnings about
mismatched volatile/non-volatile pointers that appeared with
CLang when using GLib2 >= 2.67

We have now just hit the reverse problem, GCC >= 11 has started
warning about mismatched volatile/non-volatile pointers but only
with GLib2 < 2.67. The new GLib2 avoids the warning, as does
older GCC.

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
src/util/glibcompat.h