From patchwork Tue Jan 24 23:36:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 18193 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 6B786BDB1D for ; Tue, 24 Jan 2023 23:36:32 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id C7409625E4; Wed, 25 Jan 2023 00:36:31 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1674603391; bh=QgfwCjPT96MLrsXgB7tYfPYX77ucvKS6qSKqnonuY4U=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=KCtcJtqstTuglkq0ZvF7A6Et29m74GflNxLhzXnldlgL8+eQyrqEtVy+VVRmY+m98 TSRkZlkJnjc0z40LF1ZQj9hVtM8zcnjOGGNFm29SEUTLAyit+X0tdy33upVY1cTBC2 cs0xkhebiRqSyHOhhBn+6KIwuilAmucP0rnA4IYyJi3Bvt4QfKMzTgDKgVtuVgcPs6 M9ezsqQ1yoLiS1DlLc6EmYU+Ye3Gw5dxvBM0M1ZCs2aAWOk5o1L5dwEuWTcxOVaywt y8dXdcgh/C3rIu7On2M/8mt+TpTDs/EYba+hD/eQdRcBAgHpx6nDke/MR/FrUOHZpB IUvJu3iU4qOcQ== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id C010D603C7 for ; Wed, 25 Jan 2023 00:36:29 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="Xh/me29J"; dkim-atps=neutral Received: from pendragon.ideasonboard.com (213-243-189-158.bb.dnainternet.fi [213.243.189.158]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 123B46D0; Wed, 25 Jan 2023 00:36:29 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1674603389; bh=QgfwCjPT96MLrsXgB7tYfPYX77ucvKS6qSKqnonuY4U=; h=From:To:Cc:Subject:Date:From; b=Xh/me29JA0x1G6wIAn/iVyjDln3AZf4uH+a+326FICRFHAO1TQZ7UzSGV2RKLwYW5 B/mnj3MwRGRPlNdIeqBmi3i+MpUMGepbT9rurBVqp5dC1kZZ3B6TUqwFISLfSyDXFf OUE5mXU1oiFVzkjr+oGSOaIWJMxSfwRppYgJ/d6M= To: libcamera-devel@lists.libcamera.org Date: Wed, 25 Jan 2023 01:36:24 +0200 Message-Id: <20230124233624.2058-1-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH] py: Drop redundant std::move() 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-Patchwork-Original-From: Laurent Pinchart via libcamera-devel From: Laurent Pinchart Reply-To: Laurent Pinchart Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" gcc-13 warns that the valueOrTuple() function has a redundant std::move() in a return statement: ../../src/py/libcamera/py_helpers.cpp: In instantiation of ‘pybind11::object valueOrTuple(const libcamera::ControlValue&) [with T = bool]’: ../../src/py/libcamera/py_helpers.cpp:38:28: required from here ../../src/py/libcamera/py_helpers.cpp:28:35: error: redundant move in return statement [-Werror=redundant-move] 28 | return std::move(t); Drop it. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen --- src/py/libcamera/py_helpers.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) base-commit: 13986d6ce3ab64c44a8f086ef8942f56bbedff63 prerequisite-patch-id: f6a3b225240a9069104d326be29ae2451ba8e9f0 prerequisite-patch-id: 8d95f21764dd480d4197b573e213721a7b6dae42 prerequisite-patch-id: 7eff091a4898b00438bac219873379769811c391 diff --git a/src/py/libcamera/py_helpers.cpp b/src/py/libcamera/py_helpers.cpp index 79891ab63862..5bedea047e31 100644 --- a/src/py/libcamera/py_helpers.cpp +++ b/src/py/libcamera/py_helpers.cpp @@ -25,7 +25,7 @@ static py::object valueOrTuple(const ControlValue &cv) for (size_t i = 0; i < cv.numElements(); ++i) t[i] = v[i]; - return std::move(t); + return t; } return py::cast(cv.get());