From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 84C31A034E; Fri, 21 Jan 2022 17:41:38 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 285DA42770; Fri, 21 Jan 2022 17:41:38 +0100 (CET) Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) by mails.dpdk.org (Postfix) with ESMTP id 3B99F40040 for ; Fri, 21 Jan 2022 17:41:37 +0100 (CET) Received: by mail-wm1-f43.google.com with SMTP id e9-20020a05600c4e4900b0034d23cae3f0so23111504wmq.2 for ; Fri, 21 Jan 2022 08:41:37 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:date:in-reply-to :references:content-transfer-encoding:user-agent:mime-version; bh=umeYDqoyRcelPyNkwu3aJA8yLa0n4R07i6+LZq2OAds=; b=G5xesr4gZm02n9hAg1PWwr5LPaOn6ts7JAts8M231M2UcMSMCVVNHF7KyrdWdQX5RP AdxH+0/IMJXjZMcxYAmdOq0DvbqJmDxxxYHrseteBcdrVQYotf9ntNei5Ky9oGUNpD5M j/EkDueMwzBhu8VzaK+vDbZmxYtpp2mFa0H8rxJo2HlPfmvDKMzOOyxkWYUW/f1t7qPZ uASpVXhHoyKe7kRR51MyX2Xik04O2N60iNp15MdZg1Tqm0D4Pu38IDdfpTPZOlOylrPF lvzmVkn5Bh15qfnpXGoAXPbFyz/T2UfXuwPdgBPe8eIGeijgh17hGpZ9s+PVn3tO78j/ cUBw== X-Gm-Message-State: AOAM532ZlU5mw9OHJM2L3XUujjXCbXaS4UscCWsEwPZGrIKdTxlOpsom qT+QiIZhiglz1rXH1dIU4gKIq+OhkIHhkg== X-Google-Smtp-Source: ABdhPJzsefRI2o+MDtSr3hPSXmCLG+2qFl0Jfelk11h0UxaMylZLfw9rk2m169LknJxP2cDY5lIG9w== X-Received: by 2002:a05:600c:3391:: with SMTP id o17mr1440707wmp.156.1642783296801; Fri, 21 Jan 2022 08:41:36 -0800 (PST) Received: from localhost ([137.220.125.106]) by smtp.gmail.com with ESMTPSA id r20sm2408101wmq.33.2022.01.21.08.41.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Jan 2022 08:41:36 -0800 (PST) Message-ID: <746d3b6884eeb51c2d565763a54734db0400cfbc.camel@debian.org> Subject: Re: [PATCH] build: fix meson warning about using compiler warning flags From: Luca Boccassi To: Bruce Richardson , dev@dpdk.org Date: Fri, 21 Jan 2022 16:41:35 +0000 In-Reply-To: <20220121155346.1994682-1-bruce.richardson@intel.com> References: <20220121155346.1994682-1-bruce.richardson@intel.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.38.3-1+plugin MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Fri, 2022-01-21 at 15:53 +0000, Bruce Richardson wrote: > Each build, meson would issue a warning reporting that the > "warning_level" setting should be used in place of adding -Wextra > directly to our build commands. Testing with meson 0.61 shows that the > only difference for gcc and clang builds between warning levels 1 and > 2 is the addition of -Wextra, so we can remove the warning by deleting > our explicit set of Wextra and changing the build defaults to > warning_level 2. >=20 > Fixes: 524a0d5d66b9 ("build: enable extra warnings with meson") >=20 > Signed-off-by: Bruce Richardson > --- >=20 > NOTE1: Not putting CC stable for this patch, I don't believe it's worth > the risk of backporting. >=20 > NOTE2: For reference, when building a test "hello world" project with > different warning levels, the following flags are used by meson: >=20 > warning_level=3D0: > warning_level=3D1: -Wall -Winvalid-pch > warning_level=3D2: -Wall -Winvalid-pch -Wextra > warning_level=3D3: -Wall -Winvalid-pch -Wextra -Wpedantic > --- > =C2=A0config/meson.build | 5 ++--- > =C2=A0meson.build | 2 +- > =C2=A02 files changed, 3 insertions(+), 4 deletions(-) >=20 > diff --git a/config/meson.build b/config/meson.build > index ee12318d4f..7134e80e8d 100644 > --- a/config/meson.build > +++ b/config/meson.build > @@ -247,10 +247,9 @@ endif > =C2=A0add_project_arguments('-include', 'rte_config.h', language: 'c') > =C2=A0 >=20 > =C2=A0# enable extra warnings and disable any unwanted warnings > +# -Wall is added by default at warning level 1, and -Wextra > +# at warning level 2 (DPDK default) > =C2=A0warning_flags =3D [ > - # -Wall is added by meson by default, so add -Wextra only > - '-Wextra', > - > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0# additional warnin= gs in alphabetical order > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0'-Wcast-qual', > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0'-Wdeprecated', > diff --git a/meson.build b/meson.build > index 1223b79d74..070243a33d 100644 > --- a/meson.build > +++ b/meson.build > @@ -7,7 +7,7 @@ project('DPDK', 'C', > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0version: run_comman= d(find_program('cat', 'more'), > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0files('VERSION'), check: true).stdout().strip(), > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0license: 'BSD', > - default_options: ['buildtype=3Drelease', 'default_library=3Dstat= ic'], > + default_options: ['buildtype=3Drelease', 'default_library=3Dstat= ic', 'warning_level=3D2'], > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0meson_version: '>= =3D 0.49.2' > =C2=A0) > =C2=A0 >=20 Acked-by: Luca Boccassi --=20 Kind regards, Luca Boccassi