From patchwork Mon May 27 00:15:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Niklas_S=C3=B6derlund?= X-Patchwork-Id: 1294 Return-Path: Received: from bin-mail-out-05.binero.net (bin-mail-out-05.binero.net [195.74.38.228]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 2FE75618F5 for ; Mon, 27 May 2019 02:16:07 +0200 (CEST) X-Halon-ID: 9c98fd1f-8014-11e9-8ab4-005056917a89 Authorized-sender: niklas@soderlund.pp.se Received: from bismarck.berto.se (unknown [89.233.230.99]) by bin-vsp-out-01.atm.binero.net (Halon) with ESMTPA id 9c98fd1f-8014-11e9-8ab4-005056917a89; Mon, 27 May 2019 02:16:02 +0200 (CEST) From: =?utf-8?q?Niklas_S=C3=B6derlund?= To: libcamera-devel@lists.libcamera.org Date: Mon, 27 May 2019 02:15:27 +0200 Message-Id: <20190527001543.13593-2-niklas.soderlund@ragnatech.se> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190527001543.13593-1-niklas.soderlund@ragnatech.se> References: <20190527001543.13593-1-niklas.soderlund@ragnatech.se> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 01/17] meson: Allow partially initializing objects X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 May 2019 00:16:08 -0000 There are valid use-cases where one might wish to partially initialize a structure when creating it without needing to initialize all members. This is especially common when working with V4L2. struct foo { int bar; int baz; }; struct foo f = { .bar = 1; }; Without -Wno-missing-field-initializers fails to compile with the error, error: missing initializer for member ‘foo::baz’ [-Werror=missing-field-initializers] Signed-off-by: Niklas Söderlund Acked-by: Jacopo Mondi Acked-by: Kieran Bingham --- meson.build | 1 + 1 file changed, 1 insertion(+) diff --git a/meson.build b/meson.build index 4d3e99d3e58f71d5..90ad58328f9a2bd5 100644 --- a/meson.build +++ b/meson.build @@ -22,6 +22,7 @@ endif common_arguments = [ '-Wno-unused-parameter', + '-Wno-missing-field-initializers', '-include', 'config.h', ]