From nobody Thu Apr 25 05:13:23 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 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=1619759947; cv=none; d=zohomail.com; s=zohoarc; b=DAKt6qhqg76fM6gjVCbhR7qWY8vLt9wc36Uwh712bNYQ2AfVoXJOKawqG3C6gwBwDrLVKiGYW2ApCLRslHVVTtw7Q1yqDMh9q+wanqYfbemhdoVZkjlj9nw3Y+PfvQehn9EP+cFhIz/HgCnXOIUOc1XtFSgIpsdb0vprnS/7kaY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1619759947; h=Content-Type:Content-Transfer-Encoding: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=7Xwa82W4s5HQzySmIE+LoKeBEGTwJZIiuUdpLLcQFkM=; b=hzfRwLJlNLXL3q6NoIyJ16fXwaQGnOIV25hLI1+4Kyxx5EP1LRHBeR/v9Tcrq2SqXf+Jeba5w0jxm/B5iJssbjHjiscaKWmZqTg4+3aQ2iitJT/yzWoIbfwHieNmyu4r2eXvQOm8kIxrANkr1iMeVUmigiu0g6Twq8FqqBgR36Y= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 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-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 16197599473911005.4665643819916; Thu, 29 Apr 2021 22:19:07 -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-310-q_l60A8zNNmwWcRvq6KGvQ-1; Fri, 30 Apr 2021 01:19:03 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id CA6641006C85; Fri, 30 Apr 2021 05:18:58 +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 A90D01962E; Fri, 30 Apr 2021 05:18:58 +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 2FC663807; Fri, 30 Apr 2021 05:18:58 +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 13U5ItIj018816 for ; Fri, 30 Apr 2021 01:18:55 -0400 Received: by smtp.corp.redhat.com (Postfix) id 386537013A; Fri, 30 Apr 2021 05:18:55 +0000 (UTC) Received: from localhost.localdomain (unknown [10.40.194.129]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9E5CF7012F for ; Fri, 30 Apr 2021 05:18:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1619759946; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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=7Xwa82W4s5HQzySmIE+LoKeBEGTwJZIiuUdpLLcQFkM=; b=UpcQUQ5JeqknGevgKbrvoo5PEbeGki2AEFHWx+5L/kfgjTlzbew24GEljx6VXsLijAShXr mkKyXFvkJjXNFodQsHd6Tiq3uRWEWjO6IpUlh5dvjGIhcawbbVg/8WmijzQAsVv2sTxbBC Tc9wHa0hv4LehOVYf+9nVrkwrK1fZ0U= X-MC-Unique: q_l60A8zNNmwWcRvq6KGvQ-1 From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH 1/2] qemu_domainjob: Drop 'const' from strings in _qemuDomainJobObj Date: Fri, 30 Apr 2021 07:18:48 +0200 Message-Id: <10aa7616223d8c200d54aeab77a067640711227e.1619759870.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com 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.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com 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" These strings are not constant really. They are allocated in qemuDomainObjBeginJobInternal() and freed in qemuDomainReset*Job(). Freeing a pointer to const looks weird. Signed-off-by: Michal Privoznik Reviewed-by: Pavel Hrdina --- src/qemu/qemu_domainjob.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_domainjob.h b/src/qemu/qemu_domainjob.h index 75cf1deb6a..46cbb8a067 100644 --- a/src/qemu/qemu_domainjob.h +++ b/src/qemu/qemu_domainjob.h @@ -179,20 +179,20 @@ struct _qemuDomainJobObj { /* The following members are for QEMU_JOB_* */ qemuDomainJob active; /* Currently running job */ unsigned long long owner; /* Thread id which set current job= */ - const char *ownerAPI; /* The API which owns the job */ + char *ownerAPI; /* The API which owns the job */ unsigned long long started; /* When the current job started */ =20 /* The following members are for QEMU_AGENT_JOB_* */ qemuDomainAgentJob agentActive; /* Currently running agent job */ unsigned long long agentOwner; /* Thread id which set current age= nt job */ - const char *agentOwnerAPI; /* The API which owns the agent jo= b */ + char *agentOwnerAPI; /* The API which owns the agent jo= b */ unsigned long long agentStarted; /* When the current agent job star= ted */ =20 /* The following members are for QEMU_ASYNC_JOB_* */ virCond asyncCond; /* Use to coordinate with async jo= bs */ qemuDomainAsyncJob asyncJob; /* Currently active async job */ unsigned long long asyncOwner; /* Thread which set current async = job */ - const char *asyncOwnerAPI; /* The API which owns the async jo= b */ + char *asyncOwnerAPI; /* The API which owns the async jo= b */ unsigned long long asyncStarted; /* When the current async job star= ted */ int phase; /* Job phase (mainly for migration= s) */ unsigned long long mask; /* Jobs allowed during async job */ --=20 2.26.3 From nobody Thu Apr 25 05:13:23 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 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=1619760004; cv=none; d=zohomail.com; s=zohoarc; b=OZL1C9fCpFmopb4IVQ/0oS90rk4p4NViPfp3hT5OEom35v1f6D8oAyc4O4X3jq/dTZdm6zbA/mcKY2JSv/umGhhlJCPdPnI0+yPm23lDSgWbbm8HGr3YnVKmaZcTvrQ7tWydyO/TZ2TyAphs2Bmr19X+YA7ZvYIyvxNxfWvwXCE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1619760004; h=Content-Type:Content-Transfer-Encoding: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=18l/5x3DW8so6HNodCfXBVr7S4UcOmCQkd6xSltD0ps=; b=OkodHveTHf7IbaR6S4dTJ6Qu6Y5ruKD7XRDP8LVt9Bde4Vlom1I6N/V78Mk8HFdIGR8dsTAa0PrHWveyEDFFmovQB/Z5/hNRbLe0Omm4U/o3LEaU155u9dOeQSDou4TDq45iI9DSg3hdkSsR3EFcO5EqFWq318OZcdrFJg2Hvd8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 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-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1619760004122285.8454084322291; Thu, 29 Apr 2021 22:20:04 -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-515-jybp-DWrO9ejvgD0zLqG0Q-1; Fri, 30 Apr 2021 01:19:14 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8DC1F8030DD; Fri, 30 Apr 2021 05:19:08 +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 6277F19D7C; Fri, 30 Apr 2021 05:19:08 +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 286D855342; Fri, 30 Apr 2021 05:19:08 +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 13U5IuWs018824 for ; Fri, 30 Apr 2021 01:18:56 -0400 Received: by smtp.corp.redhat.com (Postfix) id 2E78A7013A; Fri, 30 Apr 2021 05:18:56 +0000 (UTC) Received: from localhost.localdomain (unknown [10.40.194.129]) by smtp.corp.redhat.com (Postfix) with ESMTP id 940C37012F for ; Fri, 30 Apr 2021 05:18:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1619760003; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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=18l/5x3DW8so6HNodCfXBVr7S4UcOmCQkd6xSltD0ps=; b=AScTT2dI7dDN8aWa1ree8azhbiQCITZigVjRDB474Tg6VEdyl8rkEuNrB98Oc4dQFcjVcf 1LBJB1awfeldQqnbQ2adJ3/GrHH+DJIukUqaSC2myyTTx7PKoVblOdk9b3WWCrhCd7a5Tr FSyfy5sn6NP+vwAod9h0qlL4t+dV9Uk= X-MC-Unique: jybp-DWrO9ejvgD0zLqG0Q-1 From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH 2/2] meson: Declare GLIB_VERSION_* macros at configure Date: Fri, 30 Apr 2021 07:18:49 +0200 Message-Id: <740a20e8f67583b9ffcd84c0acc5d06b5eb6c1e4.1619759870.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com 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.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com 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" So far we have three places where glib version is recorded: meson.build and then in config.h. The latter is so well hidden that it's easy to miss when bumping minimal glib version in the former. With a bit of python^Wmeson string magic GLIB_VERSION_MIN_REQUIRED and GLIB_VERSION_MAX_ALLOWED macros can be defined to match glib_version from meson.build. Signed-off-by: Michal Privoznik --- config.h | 10 ---------- meson.build | 7 +++++++ 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/config.h b/config.h index ca6720f37d..0eacfd139d 100644 --- a/config.h +++ b/config.h @@ -51,13 +51,3 @@ #else # error You either need at least GCC 4.8 or Clang 3.4 or XCode Clang 5.1 t= o compile libvirt #endif - -/* Ask for warnings for anything that was marked deprecated in - * the defined version, or before. It is a candidate for rewrite. - */ -#define GLIB_VERSION_MIN_REQUIRED GLIB_VERSION_2_48 - -/* Ask for warnings if code tries to use function that did not - * exist in the defined version. These risk breaking builds - */ -#define GLIB_VERSION_MAX_ALLOWED GLIB_VERSION_2_48 diff --git a/meson.build b/meson.build index 951da67896..597e5d8a13 100644 --- a/meson.build +++ b/meson.build @@ -949,6 +949,13 @@ endif glib_dep =3D declare_dependency( dependencies: [ glib_dep, gobject_dep, gio_dep ], ) +glib_version_arr=3Dglib_version.split('.') +# Ask for warnings for anything that was marked deprecated in +# the defined version, or before. It is a candidate for rewrite. +conf.set('GLIB_VERSION_MIN_REQUIRED', 'GLIB_VERSION_' + glib_version_arr[0= ] + '_' + glib_version_arr[1]) +# Ask for warnings if code tries to use function that did not +# exist in the defined version. These risk breaking builds +conf.set('GLIB_VERSION_MAX_ALLOWED', 'GLIB_VERSION_' + glib_version_arr[0]= + '_' + glib_version_arr[1]) =20 glusterfs_version =3D '3.4.1' glusterfs_dep =3D dependency('glusterfs-api', version: '>=3D' + glusterfs_= version, required: get_option('glusterfs')) --=20 2.26.3