[libvirt PATCH] util: squelch G_DEFINE_TYPE volatile warnings with GCC 11
Michal Privoznik
mprivozn at redhat.com
Thu Dec 3 12:57:53 UTC 2020
On 12/3/20 12:37 PM, Daniel P. Berrangé wrote:
> In this previous commit:
>
> commit 65491a2dfe00bfcf9f09a8d6eab60234b56c8cc4
> Author: Martin Kletzander <mkletzan at 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.
>
> Signed-off-by: Daniel P. Berrangé <berrange at redhat.com>
> ---
> src/util/glibcompat.h | 31 +++++++++++++++++++++++++++----
> 1 file changed, 27 insertions(+), 4 deletions(-)
Reviewed-by: Michal Privoznik <mprivozn at redhat.com>
Michal
More information about the libvir-list
mailing list