From nobody Sat Nov 23 14:52:43 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1723458685194767.4542027666758; Mon, 12 Aug 2024 03:31:25 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 19E7A1541; Mon, 12 Aug 2024 06:31:24 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 1CD69154E; Mon, 12 Aug 2024 06:31:00 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id F0FF21535; Mon, 12 Aug 2024 06:30:57 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 786D71527 for ; Mon, 12 Aug 2024 06:30:57 -0400 (EDT) Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-662-5NFhYo3xMxi3LuPT4RPESQ-1; Mon, 12 Aug 2024 06:30:56 -0400 Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 548581953946 for ; Mon, 12 Aug 2024 10:30:55 +0000 (UTC) Received: from toolbox.redhat.com (unknown [10.42.28.155]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 47EF1196BE80; Mon, 12 Aug 2024 10:30:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1723458657; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=G/UUcSQAEgjskTI+bbsupsO/2mCOKIaW5P7JRnD+afE=; b=UspNeA0M2WF8xCtGBei9c6BmAzvt7BuxQDu5WEhIuKv4g5OWU31rN8pE+issD1Z2QADpj8 aYWQyCeV0SE+wv5Z1N04psQq68D8rZbzDDI/jR7J8VavvPdusG+cz0n0VB4qSg2j9w1XZo jROCRG9YZPfZLPrLlQ1JGd3iQyBVeAM= X-MC-Unique: 5NFhYo3xMxi3LuPT4RPESQ-1 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: devel@lists.libvirt.org Cc: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PATCH] glibcompat: remove obsolete clang workaround Date: Mon, 12 Aug 2024 11:30:47 +0100 Message-ID: <20240812103047.1902530-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.15 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: BZTVDHGJ2YI5CW7YZASMQBH5IUZO77IE X-Message-ID-Hash: BZTVDHGJ2YI5CW7YZASMQBH5IUZO77IE X-MailFrom: berrange@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1723458686649116600 Content-Type: text/plain; charset="utf-8" This mostly reverts commit 65491a2dfe00bfcf9f09a8d6eab60234b56c8cc4. There was a bug introduced in glib 2.67.0 which impacted libvirt with clang causing -Wincompatible-pointer-types-discards-qualifiers warnings. This was actually fixed quite quickly in 2.67.1 with https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719 Our workaround was then broken with glib 2.81.1 due to commit 14b3d5da9019150d821f6178a075d85044b4c255 changing the signature of the (private) macro we were overriding. Since odd-number glib releases are development snapshots, and the original problem was only present in 2.67.0 and no other releases, just drop the workaround entirely. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Michal Privoznik --- src/util/glibcompat.h | 28 +--------------------------- 1 file changed, 1 insertion(+), 27 deletions(-) diff --git a/src/util/glibcompat.h b/src/util/glibcompat.h index 3518023a41..474ff95bc5 100644 --- a/src/util/glibcompat.h +++ b/src/util/glibcompat.h @@ -22,33 +22,7 @@ #include #include =20 -#if GLIB_CHECK_VERSION(2, 67, 0) - -# if defined(__clang__) - -/* - * Clang detects (valid) issue in G_DEFINE_TYPE and derivatives starting w= ith - * glib >=3D 2.67.0. See https://gitlab.gnome.org/GNOME/glib/-/issues/600 - * - * For that we need to disable the one check that produces an error in our - * builds when using any G_DEFINE_TYPE* macro. Thankfully all those macro= s end - * up using _G_DEFINE_TYPE_EXTENDED_BEGIN. Because with that we can redef= ine - * this one macro to cover all use cases. The macro is defined the same w= ay it - * is defined in glib (with a very low probability of being changed thanks= to a - * comment above it). - */ -# undef _G_DEFINE_TYPE_EXTENDED_BEGIN - -# define _G_DEFINE_TYPE_EXTENDED_BEGIN(TypeName, type_name, TYPE_PARENT, = flags) \ - _Pragma("GCC diagnostic push") \ - _Pragma("GCC diagnostic ignored \"-Wincompatible-pointer-types-discard= s-qualifiers\"") \ - _G_DEFINE_TYPE_EXTENDED_BEGIN_PRE(TypeName, type_name, TYPE_PARENT) \ - _G_DEFINE_TYPE_EXTENDED_BEGIN_REGISTER(TypeName, type_name, TYPE_PAREN= T, flags) \ - _Pragma("GCC diagnostic pop") - -# endif /* __clang__ */ - -#else /* GLib < 2.67.0 */ +#if !GLIB_CHECK_VERSION(2, 67, 0) =20 /* * ...meanwhile GCC >=3D 11 has started issuing warnings about volatile --=20 2.45.2