Show a patch.

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

{
    "id": 26811,
    "url": "https://patchwork.libcamera.org/api/patches/26811/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/26811/",
    "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": "<20260527171041.110173-1-simonparri@ganzeria.com>",
    "date": "2026-05-27T17:10:37",
    "name": "[RFC] meson: Make rpi/pisp pipeline build on GCC at low optimization",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "985fdda75915e796ccce718198888913ecb3176c",
    "submitter": {
        "id": 263,
        "url": "https://patchwork.libcamera.org/api/people/263/?format=api",
        "name": "Simon Parri",
        "email": "simonparri@ganzeria.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/26811/mbox/",
    "series": [
        {
            "id": 5968,
            "url": "https://patchwork.libcamera.org/api/series/5968/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5968",
            "date": "2026-05-27T17:10:37",
            "name": "[RFC] meson: Make rpi/pisp pipeline build on GCC at low optimization",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/5968/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/26811/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/26811/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 93AE6BDCBC\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 27 May 2026 17:10:52 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id BBC8C63024;\n\tWed, 27 May 2026 19:10:51 +0200 (CEST)",
            "from omta002.uswest2.a.cloudfilter.net\n\t(omta002.uswest2.a.cloudfilter.net [35.164.127.225])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id CF5A162E6A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 27 May 2026 19:10:49 +0200 (CEST)",
            "from mcc-obgw-6002b.ext.cloudfilter.net ([10.244.128.100])\n\tby cmsmtp with ESMTP\n\tid SFu5wmnMjk3IVSHmKwoXEF; Wed, 27 May 2026 17:10:48 +0000",
            "from localhost ([173.16.167.196]) by cmsmtp with ESMTPS\n\tid SHmGw6kiQJ8IOSHmIwTDkN; Wed, 27 May 2026 17:10:47 +0000"
        ],
        "X-Authority-Analysis": "v=2.4 cv=W9M4VQWk c=1 sm=1 tr=0 ts=6a172597\n\ta=VPmDnoH/21K0g3l4Zi3lTQ==:117 a=VPmDnoH/21K0g3l4Zi3lTQ==:17\n\ta=tGv0lvtu0_dalHgCflUA:9",
        "From": "Simon Parri <simonparri@ganzeria.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Cc": "Simon Parri <simonparri@ganzeria.com>",
        "Subject": "[RFC PATCH] meson: Make rpi/pisp pipeline build on GCC at low\n\toptimization",
        "Date": "Wed, 27 May 2026 19:10:37 +0200",
        "Message-ID": "<20260527171041.110173-1-simonparri@ganzeria.com>",
        "X-Mailer": "git-send-email 2.51.2",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-CMAE-Envelope": "MS4xfIFnnazZiwn7i3au2Qfoc8AyM9zEVipUB0UGv1ZeC/WtY0q9rIIspPsWU+bPTTiL+5yvuceMTnH9KYVSZa9FLs+HaoJn3oIGRoHAkq5S72M7wNVFKMG+\n\tYJZDa8OZhA30WZ1iuYFYEhJlm4oJQTqFzTP5TQiBA+Hv6mx15B7QG+Rn09tnJwp/M+OBWt1BGvO/oEjZY3Pbxz12c8tpRrT8tJVd8XHLBKxTrp+iUQoGQbF/\n\tIfOEe3paP4I/Hg/KrTkWuw==",
        "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": "The function PiSPCameraData::beOutputDequeue in pipelines/rpi/pisp.cpp\ncontains a variable \"index\" that is initialized in the loop along with the\nvariable \"stream\". When -ftree-vrp is not enabled, GCC cannot analyze the\ncode to determine that after \"ASSERT(stream)\", \"index\" will always be\ninitialized. Since it cannot determine that \"index\" will always be\ninitialized, it emits a warning, which is elevated to an error.\n\nIf the rpi/pisp pipeline is to be built, and the compiler is GCC, add\n-ftree-vrp to project arguments for C++.\n\nThis is not needed for Clang, since Clang always does the appropriate level of\ncode analysis (even at -O0).\n---\n\nNotes:\n    I would like advice on whether using \"add_project_arguments\" is the correct\n    thing to do here. It feels somewhat wrong to me because all the other\n    flags (as far as I can tell) are set via common_arguments / c_arguments /\n    cpp_arguments. However, since I need to check the enabled pipelines, I put the check\n    after the code that sets the \"pipelines\" variable.\n    \n    Or is my approach wrong to begin with? Should I be adjusting the code itself\n    instead of adding compiler flags? In my opinion, adding compiler flags is the\n    correct approach, since the code already works as-is with Clang.\n    \n    Thank you for your attention.\n\n meson.build | 4 ++++\n 1 file changed, 4 insertions(+)",
    "diff": "diff --git a/meson.build b/meson.build\nindex 9cd73462f..0344c55bb 100644\n--- a/meson.build\n+++ b/meson.build\n@@ -241,6 +241,10 @@ else\n     pipelines = wanted_pipelines\n endif\n \n+if cc.get_id() == 'gcc' and pipelines.contains('rpi/pisp')\n+    add_project_arguments('-ftree-vrp', language : 'cpp')\n+endif\n+\n # Tests require the vimc pipeline handler, include it automatically when tests\n # are enabled.\n if get_option('test')\n",
    "prefixes": [
        "RFC"
    ]
}