Show a patch.

GET /api/patches/26315/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 26315,
    "url": "https://patchwork.libcamera.org/api/patches/26315/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/26315/",
    "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": "<20260323102724.1385487-3-barnabas.pocze@ideasonboard.com>",
    "date": "2026-03-23T10:27:19",
    "name": "[RFC,v2,2/7] meson: Ignore `Wredundant-move` with GCC 11 and above",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "fb4e59fd8c6b3eb84e4dc8e41e0d95407afee876",
    "submitter": {
        "id": 216,
        "url": "https://patchwork.libcamera.org/api/people/216/?format=api",
        "name": "Barnabás Pőcze",
        "email": "barnabas.pocze@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/26315/mbox/",
    "series": [
        {
            "id": 5837,
            "url": "https://patchwork.libcamera.org/api/series/5837/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5837",
            "date": "2026-03-23T10:27:17",
            "name": "C++20 migration",
            "version": 2,
            "mbox": "https://patchwork.libcamera.org/series/5837/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/26315/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/26315/checks/",
    "tags": {},
    "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 32FC0C32F5\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 23 Mar 2026 10:27:34 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 9C70862764;\n\tMon, 23 Mar 2026 11:27:30 +0100 (CET)",
            "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 C26D562737\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 23 Mar 2026 11:27:27 +0100 (CET)",
            "from pb-laptop.local (185.221.143.129.nat.pool.zt.hu\n\t[185.221.143.129])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 5BF37591;\n\tMon, 23 Mar 2026 11:26:11 +0100 (CET)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"I/krynXv\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1774261571;\n\tbh=87Zl8dAVhoX7TEAN+gzR8eiODF1j0cJrZ90GT79RjCc=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=I/krynXvefRNBnQavvkr6G0UNOsIrpzFPek5IpIt33I3rCFOvY0k5uTz/IGye1a68\n\tuO53zy9lYf6ow4o8Ix+lR5+Cn5I4yEnNjDLvdY4cu2O/SfR7YsxGn48N0qy59Xb7pq\n\tnGW+cMxz1dU+GFuoPB+/zOEiJskh4Ek+pr2tQai8=",
        "From": "=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Cc": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>",
        "Subject": "[RFC PATCH v2 2/7] meson: Ignore `Wredundant-move` with GCC 11 and\n\tabove",
        "Date": "Mon, 23 Mar 2026 11:27:19 +0100",
        "Message-ID": "<20260323102724.1385487-3-barnabas.pocze@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.53.0",
        "In-Reply-To": "<20260323102724.1385487-1-barnabas.pocze@ideasonboard.com>",
        "References": "<20260323102724.1385487-1-barnabas.pocze@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=UTF-8",
        "Content-Transfer-Encoding": "8bit",
        "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>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "In C++20 mode, object slicing in a return statement triggers automatic move\nsince GCC 11, and using `std::move()` emits `-Wredundant-move` in those\nsame GCC versions. So disable the warning in those as well.\n\nThis is relevant for `valueOrTuple()` in `py_helpers.cpp`, which\nreturns a `py::tuple` as `py::object`.\n\nSigned-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n meson.build | 21 +++++++++++----------\n 1 file changed, 11 insertions(+), 10 deletions(-)",
    "diff": "diff --git a/meson.build b/meson.build\nindex 82867f82b..fa38fa2c0 100644\n--- a/meson.build\n+++ b/meson.build\n@@ -159,16 +159,17 @@ if cc.get_id() == 'gcc'\n         error('gcc version is too old, libcamera requires 9.0 or newer')\n     endif\n \n-    # gcc 13 implements the C++23 version of automatic move from local\n-    # variables in return statements (see\n-    # https://en.cppreference.com/w/cpp/language/return). As a result, some\n-    # previously required explicit std::move() in return statements generate\n-    # warnings. Those moves can't be removed as older compiler versions could\n-    # use copy constructors instead of move constructors. The easiest fix is to\n-    # disable the warning. With -Wpessimizing-move enabled, the compiler will\n-    # still warn of pessimizing moves, only the redundant but not pessimizing\n-    # moves will be ignored.\n-    if cc.version().version_compare('>=13')\n+    # In C++20 mode, prior to gcc 11, object slicing in a return statement didn't\n+    # perform automatic move. It required explicit std::move() usage, which now\n+    # generate warnings. Those moves can't be removed as older compiler versions\n+    # could use copy constructors instead of move constructors. The easiest fix\n+    # is to disable the warning. With -Wpessimizing-move enabled, the compiler\n+    # will still warn of pessimizing moves, only the redundant but not\n+    # pessimizing moves will be ignored.\n+    #\n+    # \\todo When dropping support for compilers older than gcc 11, drop the\n+    # argument and remove the unneeded std::move() calls.\n+    if cc.version().version_compare('>=11')\n         cpp_arguments += [\n             '-Wno-redundant-move',\n         ]\n",
    "prefixes": [
        "RFC",
        "v2",
        "2/7"
    ]
}