From patchwork Tue Nov 12 14:33:28 2019 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: 1193581 X-Patchwork-Delegate: ynezz@true.cz Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=true.cz Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="nhMA0+Aw"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47C9J51XW9z9sPF for ; Wed, 13 Nov 2019 01:35:01 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Subject:MIME-Version:Message-Id:Date:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=Mv8xXpjp2Wf2qtGdYGoWkvEoo0rzY/niEaAT1l9zU4k=; b=nhMA0+AwQydaYB nvlmYHU10Ah2DEEnQ7whpTR7qd1o2UbO6Wx2T6oJI+7K1DhnZlGZrOH28cIGA8cAMsMWbHPO5h0MM 29Pe4n81Fb4QkyDQQrFZIp/5Kp37Fpy2O5auVTvrL+0YqqVky9reHfRFHvpAztr4Fww5onxQ0qFtY DW3yKY4cGa0tfxGlgzJM/WVHzi6gR5a/xNn5cST6WIqUC7bwMIuTZYJon9Q1syM4FJwxEtlEypcSQ W0y6l29Rkv+W8pqwcL+geiwWhosY0lIuhwTJbn6icj2vXvvZ36M2e2RTw5YML/xaH0TqLGQho/c/x 2SWvKVdb9ALyEMPqsuvw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iUXFn-0001WI-Pu; Tue, 12 Nov 2019 14:34:47 +0000 Received: from smtp-out.xnet.cz ([178.217.244.18]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iUXEf-0000BJ-MI for openwrt-devel@lists.openwrt.org; Tue, 12 Nov 2019 14:33:40 +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 85F1432FF; Tue, 12 Nov 2019 15:33:34 +0100 (CET) Received: by meh.true.cz (OpenSMTPD) with ESMTP id 8511dfa3; Tue, 12 Nov 2019 15:33:24 +0100 (CET) From: =?utf-8?q?Petr_=C5=A0tetiar?= To: openwrt-devel@lists.openwrt.org Date: Tue, 12 Nov 2019 15:33:28 +0100 Message-Id: <20191112143328.25657-1-ynezz@true.cz> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191112_063337_904218_7C35B661 X-CRM114-Status: UNSURE ( 6.06 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [178.217.244.18 listed in list.dnswl.org] 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record Subject: [OpenWrt-Devel] [PATCH fwtool] cmake: use extra compiler warnings only on gcc6+ X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Petr_=C5=A0tetiar?= Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org gcc version 4.8.5 20150623 (Red Hat 4.8.5-39) and -Wextra produces following: fwtool.c:288:9: error: missing initializer for field 'cur' of 'struct data_buf' [-Werror=missing-field-initializers] struct data_buf dbuf = {}; ^ fwtool.c:37:8: note: 'cur' declared here char *cur; ^ Ref: https://github.com/openwrt/openwrt/commit/4ba8f7b1ef1e4c0607185a41c06b51928c625d8b#commitcomment-35906526 Ref: http://lists.infradead.org/pipermail/openwrt-devel/2019-November/020039.html Signed-off-by: Petr Štetiar --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index dfe6045fb4e8..0c2692a2a6ed 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,9 +3,13 @@ CMAKE_MINIMUM_REQUIRED(VERSION 3.0) PROJECT(fwtool C) INCLUDE(GNUInstallDirs) -ADD_DEFINITIONS(-Wall -Werror -Wextra -Wno-unused-parameter) +ADD_DEFINITIONS(-Wall -Werror) ADD_EXECUTABLE(fwtool fwtool.c) +IF(CMAKE_C_COMPILER_VERSION VERSION_GREATER 6) + ADD_DEFINITIONS(-Wextra -Wno-unused-parameter) +ENDIF() + IF(UNIT_TESTING) ENABLE_TESTING() ADD_SUBDIRECTORY(tests)