From patchwork Wed Feb 12 23:54:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 2804 Return-Path: Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 946D160F3C for ; Thu, 13 Feb 2020 00:55:12 +0100 (CET) Received: from pendragon.bb.dnainternet.fi (81-175-216-236.bb.dnainternet.fi [81.175.216.236]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 92E37504 for ; Thu, 13 Feb 2020 00:55:11 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1581551712; bh=taE6Pv6zX4oKEIjql4fNfYSrzoy5TjDN2/bgSS7CvIw=; h=From:To:Subject:Date:From; b=rv2RxMUavMzTRGzZ7V1kjNEtsFBhccGdhgmv1J9Og6XsBZRv+qNnIHC3SYZGSMIS9 IWz6tJ6nsgA8/sSRyNyWDxW/Cc1JY32+IOVXTK8P+L5nJ9RiGata4e9BdvHZwY3GH3 OUDgtZVGeTcC4RbigjjAWUHb/mvOX4efxLUhV7Ek= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Thu, 13 Feb 2020 01:54:51 +0200 Message-Id: <20200212235451.6206-1-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.24.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH] meson.build: Silence the C99 designators warning X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2020 23:55:12 -0000 We use array designators for array initialization, which is a C99 extension. clang-10 warns about it, causing a build failure. As this is a useful extension, silence the warning. This needs to be done only if the compiler supports the -Wno-c99-designator argument, otherwise a -Wunknown-warning-option will be generated. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham Reviewed-by: Niklas Söderlund --- meson.build | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/meson.build b/meson.build index 0bbd24b2a295..aceba997aebd 100644 --- a/meson.build +++ b/meson.build @@ -60,6 +60,12 @@ if cc.get_id() == 'clang' endif endif +if cc.has_argument('-Wno-c99-designator') + common_arguments += [ + '-Wno-c99-designator', + ] +endif + c_arguments += common_arguments cpp_arguments += common_arguments