From patchwork Wed Mar 29 07:53:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Petr_=C5=A0tetiar?= X-Patchwork-Id: 1762617 X-Patchwork-Delegate: ynezz@true.cz Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=PLqMh/x4; dkim=fail reason="key not found in DNS" header.d=true.cz header.i=@true.cz header.a=rsa-sha256 header.s=xnet header.b=NXrwlyBW; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Pmf676vsXz1yXv for ; Wed, 29 Mar 2023 18:57:19 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ivuoDSMFz+h3qsCZvMW0LbF1hhq5VKetgSC2s9fcMj0=; b=PLqMh/x4c6+qz9 dKGq+B5HtSMpC2riw2ufqciA+PSn03v/BXcEamuI1bwTfpvawX7j58bHstmAbxFvYGxQCQZ2N4w3Y O2WNt8+twSoxzrNuhRUlKS6qbvD6jaxciYllM7OEN0xGmKS/vagiG8JPwoqG1SieBxhyfwmtu/QCN etL0CbDROAzOp6lkCSHI+bZfVpLa8tMFusOAIT9yiYgGihnUixPUzCsfv55Hi+EKeI+F4JOHTOrC5 Mr5miSyX0iIl+PXEIfofxtsGJM1e0wzIoHMPAR5nRZdIEY4S5PjWzYYDTwBwKFRm0LGrnIuJf+VZf zRqfV7S4CmAqJACHj4vA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1phQdQ-00GyjQ-0Q; Wed, 29 Mar 2023 07:54:20 +0000 Received: from smtp-out.xnet.cz ([178.217.244.18]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1phQdJ-00GyhF-2b for openwrt-devel@lists.openwrt.org; Wed, 29 Mar 2023 07:54:16 +0000 Received: from meh.true.cz (meh.true.cz [108.61.167.218]) (Authenticated sender: petr@true.cz) by smtp-out.xnet.cz (Postfix) with ESMTPSA id CCD493A75; Wed, 29 Mar 2023 09:54:06 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=true.cz; s=xnet; t=1680076446; bh=umoMz/XsupONSW+T+GwEyXvMPHaffk/bzltlhWiWquw=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=NXrwlyBW87kkF5q0VdLBSGUpaEwXFlnRXRJJkUsSywTKVm2CzP6oq+8pIs0y2H89H i2VI8JYjEFOXWE4gbynCLc5uFGB9B40dqMwrhIcqbMYELw+0Yq9PHSZC3daDGu2K52 01mFK8/l8NpITXQ2qgF2AAdGMYS/Mrx2PcjcJaUs= Received: by meh.true.cz (OpenSMTPD) with ESMTP id f47c46ab; Wed, 29 Mar 2023 09:53:38 +0200 (CEST) From: =?utf-8?q?Petr_=C5=A0tetiar?= To: openwrt-devel@lists.openwrt.org Cc: =?utf-8?q?Petr_=C5=A0tetiar?= , Hauke Mehrtens Subject: [PATCH netifd 2/2] cmake: fix build by reordering the cflags definitions Date: Wed, 29 Mar 2023 09:53:47 +0200 Message-Id: <20230329075347.4674-2-ynezz@true.cz> In-Reply-To: <20230329075347.4674-1-ynezz@true.cz> References: <20230329075347.4674-1-ynezz@true.cz> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230329_005414_252181_28E8554A X-CRM114-Status: UNSURE ( 6.88 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: I've noticed bunch of build errors being emitted by clang-15/gcc-10: netifd.h:83:33: error: unused parameter 'level' [-Werror,-Wunused-parameter] and it seems, that the order of definitions matters as -Wextra probably enables previously disabled warnings like -Wno-unused-parameter. Content analysis details: (0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid 0.1 DKIM_INVALID DKIM or DK signature exists, but is not valid X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org I've noticed bunch of build errors being emitted by clang-15/gcc-10: netifd.h:83:33: error: unused parameter 'level' [-Werror,-Wunused-parameter] and it seems, that the order of definitions matters as -Wextra probably enables previously disabled warnings like -Wno-unused-parameter. So lets fix it, by reordering the cflags definitions. Cc: Hauke Mehrtens Fixes: 463a1207f076 ("netifd: Activate -Wextra compile warnings") Signed-off-by: Petr Štetiar --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b87c300fcc22..5ad86954707b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,11 +7,12 @@ IF(NOT ${CMAKE_VERSION} LESS 3.0) check_c_compiler_flag(-Wimplicit-fallthrough HAS_IMPLICIT_FALLTHROUGH) ENDIF() -ADD_DEFINITIONS(-Os -Wall -Werror --std=gnu99 -Wmissing-declarations -Wno-unused-parameter -Wno-unused-but-set-parameter) +ADD_DEFINITIONS(-Wall -Werror) IF(CMAKE_C_COMPILER_VERSION VERSION_GREATER 6) add_definitions(-Wextra -Werror=implicit-function-declaration) add_definitions(-Wformat -Werror=format-security -Werror=format-nonliteral) ENDIF() +ADD_DEFINITIONS(-Os --std=gnu99 -Wmissing-declarations -Wno-unused-parameter -Wno-unused-but-set-parameter) IF(HAS_IMPLICIT_FALLTHROUGH) ADD_DEFINITIONS(-Wimplicit-fallthrough)