Re: [libvirt PATCH v2] src: workaround warning triggered in glib 2.69

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

 



On Fri, Jul 23, 2021 at 14:19:25 +0100, Daniel P. Berrangé wrote:
> Libvirt is using the G_GNUC_FALLTHROUGH macro provided by glib since
> version 2.60. Since we need to support older glib, we also have some
> compatibility code to define it if missing.
> 
> We set the GLIB_VERSION_MAX_ALLOWED macro to ensure we get warnings
> when we use an API that dates from a glib version newer than our
> minimum benchmark. Historically this didn't get enforced for (most)
> macros, but GLib 2.69 has addressed that gap.
> 
> This causes our usage of G_GNUC_FALLTHROUGH to trigger warnings.
> GLib is right to warn, because it does not know that we have added
> our own fallback for older versions.
> 
> The only way to squelch this warning though, is to fully undefine
> the GLib provided G_GNUC_FALLTHROUGH and use our own in its place.
> We'll be able to remove all this compat burden when we finally
> update the min glib version to be >= 2.60
> 
> Signed-off-by: Daniel P. Berrangé <berrange@xxxxxxxxxx>
> ---
>  src/internal.h | 11 ++++++++++-
>  1 file changed, 10 insertions(+), 1 deletion(-)

Reviewed-by: Peter Krempa <pkrempa@xxxxxxxxxx>




[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