Patch Detail
Show a patch.
GET /api/1.1/patches/2998/?format=api
{ "id": 2998, "url": "https://patchwork.libcamera.org/api/1.1/patches/2998/?format=api", "web_url": "https://patchwork.libcamera.org/patch/2998/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/1.1/projects/1/?format=api", "name": "libcamera", "link_name": "libcamera", "list_id": "libcamera_core", "list_email": "libcamera-devel@lists.libcamera.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20200306160002.30549-27-laurent.pinchart@ideasonboard.com>", "date": "2020-03-06T15:59:56", "name": "[libcamera-devel,v2,26/32] libcamera: control_serializer: Use explicit ControlTypeNone case", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "70386bdb0bfa7077749d95f67054e006b886730f", "submitter": { "id": 2, "url": "https://patchwork.libcamera.org/api/1.1/people/2/?format=api", "name": "Laurent Pinchart", "email": "laurent.pinchart@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/2998/mbox/", "series": [ { "id": 703, "url": "https://patchwork.libcamera.org/api/1.1/series/703/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=703", "date": "2020-03-06T15:59:30", "name": "libcamera: Add support for array controls", "version": 2, "mbox": "https://patchwork.libcamera.org/series/703/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/2998/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/2998/checks/", "tags": {}, "headers": { "Return-Path": "<laurent.pinchart@ideasonboard.com>", "Received": [ "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 71745628C8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 6 Mar 2020 17:00:26 +0100 (CET)", "from pendragon.bb.dnainternet.fi (81-175-216-236.bb.dnainternet.fi\n\t[81.175.216.236])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 0E083312\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 6 Mar 2020 17:00:26 +0100 (CET)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1583510426;\n\tbh=7PF0FfPppnfJyEzZJKQHWs0q6qi4YRMie18Dc/wYhjk=;\n\th=From:To:Subject:Date:In-Reply-To:References:From;\n\tb=dyAjYxHbFqjPnFHkHzktaR4LIA7tTy8UICJ0xyHvWykbiQudGThQa9dQMQqAZYGgT\n\tRH3Xos9H0u6cX7EFf1VNAu/piacBzdaxM6fCACuqXuieNq3E6qY6A3N92i2zUfXKZt\n\tSoQ7v5M6fBWpUXrxCF5sC8NlbudSA2U/7DDT+OYo=", "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Fri, 6 Mar 2020 17:59:56 +0200", "Message-Id": "<20200306160002.30549-27-laurent.pinchart@ideasonboard.com>", "X-Mailer": "git-send-email 2.24.1", "In-Reply-To": "<20200306160002.30549-1-laurent.pinchart@ideasonboard.com>", "References": "<20200306160002.30549-1-laurent.pinchart@ideasonboard.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v2 26/32] libcamera: control_serializer:\n\tUse explicit ControlTypeNone case", "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>", "X-List-Received-Date": "Fri, 06 Mar 2020 16:00:28 -0000" }, "content": "Replace the default case with an explicit ControlTypeNone case in\nControlSerializer::load() to catch omissions when adding new control\ntypes.\n\nA return statement needs to be added to the end of the function to avoid\ngcc incorrectly reporting that some exit paths don't contain a return\nstatement. The compiler will still warn that not all cases are handled\nwhen adding a new control type.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n---\n- Add a return statement at the end of the function\n---\n src/libcamera/control_serializer.cpp | 4 +++-\n 1 file changed, 3 insertions(+), 1 deletion(-)", "diff": "diff --git a/src/libcamera/control_serializer.cpp b/src/libcamera/control_serializer.cpp\nindex 6c676811ebf3..edf3e5cab09f 100644\n--- a/src/libcamera/control_serializer.cpp\n+++ b/src/libcamera/control_serializer.cpp\n@@ -361,9 +361,11 @@ ControlValue ControlSerializer::load<ControlValue>(ControlType type,\n \t\treturn ControlValue(value);\n \t}\n \n-\tdefault:\n+\tcase ControlTypeNone:\n \t\treturn ControlValue();\n \t}\n+\n+\treturn ControlValue();\n }\n \n template<>\n", "prefixes": [ "libcamera-devel", "v2", "26/32" ] }