Patch Detail
Show a patch.
GET /api/patches/1517/?format=api
{ "id": 1517, "url": "https://patchwork.libcamera.org/api/patches/1517/?format=api", "web_url": "https://patchwork.libcamera.org/patch/1517/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/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": "<20190625131508.31263-1-kieran.bingham@ideasonboard.com>", "date": "2019-06-25T13:15:08", "name": "[libcamera-devel] libcamera: event_dispatcher_poll: Simplify range iterator", "commit_ref": "caf25dc5cfd11b965316f02610d49ae3d886716b", "pull_url": null, "state": "accepted", "archived": false, "hash": "4120e7cea1c1868b6944d0a4118387143cc5dbea", "submitter": { "id": 4, "url": "https://patchwork.libcamera.org/api/people/4/?format=api", "name": "Kieran Bingham", "email": "kieran.bingham@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/1517/mbox/", "series": [ { "id": 373, "url": "https://patchwork.libcamera.org/api/series/373/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=373", "date": "2019-06-25T13:15:08", "name": "[libcamera-devel] libcamera: event_dispatcher_poll: Simplify range iterator", "version": 1, "mbox": "https://patchwork.libcamera.org/series/373/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/1517/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/1517/checks/", "tags": {}, "headers": { "Return-Path": "<kieran.bingham@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 3BD1C61583\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 25 Jun 2019 15:15:23 +0200 (CEST)", "from localhost.localdomain\n\t(cpc89242-aztw30-2-0-cust488.18-1.cable.virginm.net [86.31.129.233])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 721CE510;\n\tTue, 25 Jun 2019 15:15:22 +0200 (CEST)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1561468522;\n\tbh=DSIf8lUFdbrUOxDDE9+b809NIHbVNaeTeYb9jN92LlU=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=JLjprkjQY3j7aTn3aHnWmk3q3aM1HPks9UacwTdWeFdT+GIjlaaz+g8oWYWypx3VM\n\t8i1tIZoybHkkT5oIDsciavRrtTNkzd6vUYkPblsv9CVlu5SVRKVtXfgMJ1UXqWMlVG\n\t4yEr3QcNy3upJclWRQA4uWfmJ0FjbLsSly+gW8F8=", "From": "Kieran Bingham <kieran.bingham@ideasonboard.com>", "To": "LibCamera Devel <libcamera-devel@lists.libcamera.org>", "Cc": "Kieran Bingham <kieran.bingham@ideasonboard.com>,\n\t\"[autobuild.buildroot.net] Thomas Petazzoni\"\n\t<thomas.petazzoni@bootlin.com>", "Date": "Tue, 25 Jun 2019 14:15:08 +0100", "Message-Id": "<20190625131508.31263-1-kieran.bingham@ideasonboard.com>", "X-Mailer": "git-send-email 2.20.1", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH] libcamera: event_dispatcher_poll:\n\tSimplify range iterator", "X-BeenThere": "libcamera-devel@lists.libcamera.org", "X-Mailman-Version": "2.1.23", "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": "Tue, 25 Jun 2019 13:15:23 -0000" }, "content": "GCCv6 and GCCv7 take objections to declaring a struct type when\nusing a range based iterator. This issue does not appear in GCCv8\n\n event_dispatcher_poll.cpp:231:13: error: types may not be defined\n\tin a for-range-declaration [-Werror]\n\n\t\tfor (const struct pollfd &pfd : pollfds) {\n\t\t ^~~~~~\n\n\tcc1plus: all warnings being treated as errors\n\nRemoving the keyword 'struct' ensures that the compiler does not try to\ndeclare the type, and instead uses the type as already defined by the\nrelevant poll.h header.\n\nReported-by: [autobuild.buildroot.net] Thomas Petazzoni <thomas.petazzoni@bootlin.com>\nSigned-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n---\n src/libcamera/event_dispatcher_poll.cpp | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)", "diff": "diff --git a/src/libcamera/event_dispatcher_poll.cpp b/src/libcamera/event_dispatcher_poll.cpp\nindex 0ff99fce47ab..df9dffb2326c 100644\n--- a/src/libcamera/event_dispatcher_poll.cpp\n+++ b/src/libcamera/event_dispatcher_poll.cpp\n@@ -241,7 +241,7 @@ void EventDispatcherPoll::processNotifiers(const std::vector<struct pollfd> &pol\n \t\t{ EventNotifier::Exception, POLLPRI },\n \t};\n \n-\tfor (const struct pollfd &pfd : pollfds) {\n+\tfor (const pollfd &pfd : pollfds) {\n \t\tauto iter = notifiers_.find(pfd.fd);\n \t\tASSERT(iter != notifiers_.end());\n \n", "prefixes": [ "libcamera-devel" ] }