[{"id":20336,"web_url":"https://patchwork.libcamera.org/comment/20336/","msgid":"<YXC4Aynk/5PVN2tO@pendragon.ideasonboard.com>","date":"2021-10-21T00:44:51","subject":"Re: [libcamera-devel] [PATCH] fixup! android: post_processor: Make\n\tpost processing async","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Umang,\n\nThank you for the patch.\n\nOn Wed, Oct 20, 2021 at 06:25:40PM +0530, Umang Jain wrote:\n> Fix build with gcc 7\n> error: missing initializer for member ‘Camera3RequestDescriptor::StreamBuffer::srcBuffer’ [-Werror=missing-field-initializers]\n> error: missing initializer for member ‘Camera3RequestDescriptor::StreamBuffer::destBuffer’ [-Werror=missing-field-initializers]\n> \n> Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>\n> ---\n>  src/android/camera_request.h | 4 ++--\n>  1 file changed, 2 insertions(+), 2 deletions(-)\n> \n> diff --git a/src/android/camera_request.h b/src/android/camera_request.h\n> index 85274414..2216781d 100644\n> --- a/src/android/camera_request.h\n> +++ b/src/android/camera_request.h\n> @@ -40,8 +40,8 @@ public:\n>  \t\tint fence;\n>  \t\tStatus status;\n>  \t\tlibcamera::FrameBuffer *internalBuffer = nullptr;\n> -\t\tstd::unique_ptr<CameraBuffer> destBuffer;\n> -\t\tconst libcamera::FrameBuffer *srcBuffer;\n> +\t\tstd::unique_ptr<CameraBuffer> destBuffer = nullptr;\n> +\t\tconst libcamera::FrameBuffer *srcBuffer = nullptr;\n\nI don't think that's the right fix. It only works because all the\nmembers that are not explicitly initialized in\nCamera3RequestDescriptor::Camera3RequestDescriptor() are at the end, if\nthat wasn't the case, you'd have to modify the buffers_.push_back() call\nto add all members explicitly, so I think we should do so.\n\nThe other option would be to add a constructor to this structure, taking\nas arguments only the members that we expect need to be set to\nnon-default values at construction time.\n\n>  \t\tCamera3RequestDescriptor *request = nullptr;\n>  \t};\n>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 843F1BDB1C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 21 Oct 2021 00:45:12 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C385668F59;\n\tThu, 21 Oct 2021 02:45:11 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 779A2604FE\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 21 Oct 2021 02:45:10 +0200 (CEST)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 001062BA;\n\tThu, 21 Oct 2021 02:45:09 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"XxXiXIJT\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1634777110;\n\tbh=OeGQXK55C6Nud2EdUmuByRmp+aeFtCg3fQwZIn2YMz4=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=XxXiXIJTezy9BwrfE+bu0G0zBoj0YldL/I1hDmSLCfkrS2eYqoKC6YVHHHaYy/2wj\n\tragluJ5IM0EXENFtJzii60Jzhj3ARGnPR1ORTg9EqSgdczRL0tQHz/hACUdsuS1ueH\n\tWfS95Z8AxCJbiuUyLhGymGxrLoHU5fcUaohfbUxk=","Date":"Thu, 21 Oct 2021 03:44:51 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Umang Jain <umang.jain@ideasonboard.com>","Message-ID":"<YXC4Aynk/5PVN2tO@pendragon.ideasonboard.com>","References":"<20211020104212.121743-4-umang.jain@ideasonboard.com>\n\t<20211020125540.165327-1-umang.jain@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<20211020125540.165327-1-umang.jain@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH] fixup! android: post_processor: Make\n\tpost processing async","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]