From nobody Fri Nov 14 05:14:58 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.74 as permitted sender) client-ip=63.128.21.74; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-74.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.74 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1584563153; cv=none; d=zohomail.com; s=zohoarc; b=dCqdSEdD+ExqQ9llYXJo9NqVrB4pB0pwuQjP8+TPJMNKaGvXh6Jbsos2RNssBz7gc8g0y5vpqLiV2CUOdEwDyAtVwLYHfMOJIuOmxZ+X3/7eF9XC/k/lJb+gdpdwenhUqmToiZ0SrolEMgsOBpiqj3pcwxJnonX2m4W5H5iBgfQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1584563153; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=q9lbwOKLskc4XpV5HM+gjc7F18xWnZPhhhsdSKTCVGE=; b=ecOyWWMqEqfYu3bcGSn85lFLv2vUaZxGLcYTlrgzmsXjA7Plye5d3zz8nsBJ5VWT/hgjgQiBgDEb7cjdOz8tohOaC3tmpI/tn59gdqWrpE0BILLBwu8zg4pgG7VNk2DnprNYjCf3NyX5XyqKDRt2nBY2P6yo3Yo46QXtOgYPCE0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.74 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-74.mimecast.com (us-smtp-delivery-74.mimecast.com [63.128.21.74]) by mx.zohomail.com with SMTPS id 1584563153933501.88366151959303; Wed, 18 Mar 2020 13:25:53 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-132-Zfqe3ZtoPoSeS6MzoE-6DQ-1; Wed, 18 Mar 2020 16:25:49 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 1FB82100726B; Wed, 18 Mar 2020 20:25:44 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E141F60BF1; Wed, 18 Mar 2020 20:25:43 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 68FAD87010; Wed, 18 Mar 2020 20:25:43 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 02IKOR8a004592 for ; Wed, 18 Mar 2020 16:24:27 -0400 Received: by smtp.corp.redhat.com (Postfix) id 9BFBD61075; Wed, 18 Mar 2020 20:24:27 +0000 (UTC) Received: from probe.redhat.com (ovpn-112-191.rdu2.redhat.com [10.10.112.191]) by smtp.corp.redhat.com (Postfix) with ESMTP id D31FB6106D; Wed, 18 Mar 2020 20:24:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1584563152; h=from:from:sender:sender: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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=q9lbwOKLskc4XpV5HM+gjc7F18xWnZPhhhsdSKTCVGE=; b=BiuK1tjoL5+EEU7CcJgLwi/atCsNSS8WGsUUS4M7cRN1ZNw2ffLClqbaHn6GUFacQA2X4Z bCR5AqwFuY6SQkjTKbGnNnCj0XldDln46LzIdZBhRM2As+blapna8b88a1HL+Fclk0qyAc Z3g5nRHeufcfcrHw9nXirwN/UncblgQ= X-MC-Unique: Zfqe3ZtoPoSeS6MzoE-6DQ-1 From: John Snow To: qemu-devel@nongnu.org, jsnow@redhat.com, Peter Maydell Subject: [PULL v2 01/11] build: Silence clang warning on older glib autoptr usage Date: Wed, 18 Mar 2020 16:23:31 -0400 Message-Id: <20200318202341.6961-2-jsnow@redhat.com> In-Reply-To: <20200318202341.6961-1-jsnow@redhat.com> References: <20200318202341.6961-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Cc: Kevin Wolf , Fam Zheng , Vladimir Sementsov-Ogievskiy , qemu-block@nongnu.org, Juan Quintela , libvir-list@redhat.com, Max Reitz , Stefan Hajnoczi , "Dr. David Alan Gilbert" X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" From: Eric Blake glib's G_DEFINE_AUTOPTR_CLEANUP_FUNC() macro defines several static inline functions, often with some of them unused, but prior to 2.57.2 did not mark the functions as such. As a result, clang (but not gcc) fails to build with older glib unless -Wno-unused-function is enabled. Reported-by: Peter Maydell Signed-off-by: Eric Blake Reviewed-by: John Snow Message-id: 20200317175534.196295-1-eblake@redhat.com Signed-off-by: John Snow --- configure | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/configure b/configure index 06fcd070fb..479336bf6e 100755 --- a/configure +++ b/configure @@ -3851,6 +3851,26 @@ if ! compile_prog "$glib_cflags -Werror" "$glib_libs= " ; then fi fi =20 +# Silence clang warnings triggered by glib < 2.57.2 +cat > $TMPC << EOF +#include +typedef struct Foo { + int i; +} Foo; +static void foo_free(Foo *f) +{ + g_free(f); +} +G_DEFINE_AUTOPTR_CLEANUP_FUNC(Foo, foo_free); +int main(void) { return 0; } +EOF +if ! compile_prog "$glib_cflags -Werror" "$glib_libs" ; then + if cc_has_warning_flag "-Wno-unused-function"; then + glib_cflags=3D"$glib_cflags -Wno-unused-function" + CFLAGS=3D"$CFLAGS -Wno-unused-function" + fi +fi + ######################################### # zlib check =20 --=20 2.21.1