From nobody Mon May 6 01:40:54 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 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=1599135066; cv=none; d=zohomail.com; s=zohoarc; b=m7R4qoXdQZKbT4f4GA3aJGGm7KxrOrFq+5Cb+jzC0vRS5RBzBOHdsjzWMJQ7MZu9+lF6/4gr2tS1ugsxQPKjFh3bT2cArh8Qi0MYB/3sNvO04AFRnyQbKD2JNm/y0DGBLAftiSn7LizvD6AYMuLhNY9nfmFtlLC2NBguq9LJU+A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1599135066; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=4+rC7dJrzZNa5VYeBHu3ELZSy8fondAwk0y2Ov8uH1I=; b=Glcg49YRPQrI5JBG9Evl5vb+STJgtJpN3QRdadPrLuJmsY8U0hG8Q7PdVxfs89iDiKx/oFLm2IAocDXq7BMXc0TTLcVDUa5MeAJHmZ1ylsqPF55yKhjoLv5cQ7CmtnF9qvNd+i7VKL8NJFSrSA4cMo1A2L2dQe7yuQZqCNseEaw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 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-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1599135066663443.84851042749403; Thu, 3 Sep 2020 05:11:06 -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-109-R8Q0vxR8M9ON8DzcNjb9BQ-1; Thu, 03 Sep 2020 08:08:19 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id BCE0380F054; Thu, 3 Sep 2020 12:08:13 +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 8CF1D7EEC4; Thu, 3 Sep 2020 12:08:13 +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 DADA179DAE; Thu, 3 Sep 2020 12:08:11 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 083C8AOh015823 for ; Thu, 3 Sep 2020 08:08:10 -0400 Received: by smtp.corp.redhat.com (Postfix) id B83BA10001B3; Thu, 3 Sep 2020 12:08:10 +0000 (UTC) Received: from antique-work.redhat.com (unknown [10.40.194.177]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3637C1001B2B for ; Thu, 3 Sep 2020 12:08:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1599135065; 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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=4+rC7dJrzZNa5VYeBHu3ELZSy8fondAwk0y2Ov8uH1I=; b=QsvJpLXxfSJvRH8BM2NG+vm7ePdGAt10klpAGWaneREjP0WSbGFuq9HzIQQoJrPdxdT0E6 vSoUHsye+QDA4699HMFQp5ZxgGmyhm6Oz4BW7uE8bV4wpxxW2x09E/ercl5qFzHASY28yh QUaa/oP/WthABNpYPmegDhHVEjMn6vY= X-MC-Unique: R8Q0vxR8M9ON8DzcNjb9BQ-1 From: Pavel Hrdina To: libvir-list@redhat.com Subject: [libvirt PATCH v2] meson: add -Wall and -Wextra explicitly Date: Thu, 3 Sep 2020 14:08:06 +0200 Message-Id: <3c6c75beb965fe502b292636a4b97f54e0fea4df.1599134825.git.phrdina@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 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.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0.001 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" If someone runs `meson setup --buildtype plain` meson ignores warning_level=3D2 that is in our meson.build file. The implication is that Meson will not automatically add -Wall which enables -Wformat. This breaks building libvirt from git with the buildtype set to plain. There is an issue reported [1] to not ignore warning_level silently and the change to ignore it was done by upstream commit [2]. This change makes Meson print warnings about using warning_level which as described above doesn't work for all build types. [1] [2] Signed-off-by: Pavel Hrdina Reviewed-by: Daniel P. Berrang=C3=A9 --- Chages in v2: - add -Wall and -Wextra explicitly regardless of the buildtype meson.build | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 1aad385ad1..1eadea33bf 100644 --- a/meson.build +++ b/meson.build @@ -228,6 +228,7 @@ cc_flags +=3D [ '-Waddress', '-Waddress-of-packed-member', '-Waggressive-loop-optimizations', + '-Wall', '-Wattribute-warning', '-Wattributes', '-Wbool-compare', @@ -257,6 +258,7 @@ cc_flags +=3D [ '-Wempty-body', '-Wendif-labels', '-Wexpansion-to-defined', + '-Wextra', '-Wformat-contains-nul', '-Wformat-extra-args', '-Wformat-nonliteral', @@ -503,10 +505,6 @@ cc_flags_disabled =3D [ # In meson this is specified using 'c_std=3Dgnu99' in project() function. '-std=3Dgnu99', =20 - # In meson this is specified using 'warning_level=3D2' in project() func= tion. - '-Wall', - '-Wextra', - # don't care about C++ compiler compat '-Wc++-compat', '-Wabi', --=20 2.26.2