Show a patch.

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

{
    "id": 12474,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/12474/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/12474/",
    "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": "<20210531020745.13815-2-laurent.pinchart@ideasonboard.com>",
    "date": "2021-05-31T02:07:44",
    "name": "[libcamera-devel,1/2] libcamera: pipeline: ipu3: Fix warning when compiled with optimization",
    "commit_ref": null,
    "pull_url": null,
    "state": "rejected",
    "archived": false,
    "hash": "eadade5a2ab75be1944b4a351a53d957212189cc",
    "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/12474/mbox/",
    "series": [
        {
            "id": 2094,
            "url": "https://patchwork.libcamera.org/api/1.1/series/2094/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2094",
            "date": "2021-05-31T02:07:43",
            "name": "Fix gcc warning in IPU3 pipeline handler",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/2094/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/12474/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/12474/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 65FCBC3206\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 31 May 2021 02:08:02 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 7A74C68922;\n\tMon, 31 May 2021 04:08:01 +0200 (CEST)",
            "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 97A5A6891F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 31 May 2021 04:07:58 +0200 (CEST)",
            "from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 2E7E51178\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 31 May 2021 04:07:58 +0200 (CEST)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"V7M0C5j2\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1622426878;\n\tbh=8e+WjEE7j1S2SEp2nJgM1IJC2oM1b0M12tAAvOIdm8w=;\n\th=From:To:Subject:Date:In-Reply-To:References:From;\n\tb=V7M0C5j21k9BRXdVj1Con2puP1q74gUjZtn6CQBKu6+kd4lAGA6eR2KB/fxt/oOen\n\tLi8KYREar3wk4pp+vuEi4pmtGDE39JNV64u0SISZMhktaT340/bv/kUW0o7emsdPkT\n\t1fGV1pbfrKeB5zA3oU+QDyZDpOiQfRYWwxX1xXro=",
        "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Mon, 31 May 2021 05:07:44 +0300",
        "Message-Id": "<20210531020745.13815-2-laurent.pinchart@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.31.1",
        "In-Reply-To": "<20210531020745.13815-1-laurent.pinchart@ideasonboard.com>",
        "References": "<20210531020745.13815-1-laurent.pinchart@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=UTF-8",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH 1/2] libcamera: pipeline: ipu3: Fix\n\twarning when compiled with optimization",
        "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": "When compiling with optimization, gcc 9 and newer throw an unitialized\nvariable warning:\n\n../../src/libcamera/pipeline/ipu3/imgu.cpp: In function ‘void libcamera::{anonymous}::calculateBDSHeight(libcamera::ImgUDevice::Pipe*, const libcamera::Size&, const libcamera::Size&, unsigned int, float)’:\n../../src/libcamera/pipeline/ipu3/imgu.cpp:172:17: error: ‘bdsHeight’ may be used uninitialized in this function [-Werror=maybe-uninitialized]\n  172 |    unsigned int bdsIntHeight = static_cast<unsigned int>(bdsHeight);\n\nNeither clang not gcc versions older than 9 complain. This seems to be\na false positive, work around it by initializing the bdsHeight variable\nwhen declaring it.\n\nNote that there are obvious errors in the code, with the second while ()\nloop in the first part of calculateBDSHeight() modifying the bdsHeight\nvariable set by the first loop even if the second loop doesn't find a\nsuitable height, but that's out of scope for this fix.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/libcamera/pipeline/ipu3/imgu.cpp | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)",
    "diff": "diff --git a/src/libcamera/pipeline/ipu3/imgu.cpp b/src/libcamera/pipeline/ipu3/imgu.cpp\nindex 3e517ac67962..f3eaab648399 100644\n--- a/src/libcamera/pipeline/ipu3/imgu.cpp\n+++ b/src/libcamera/pipeline/ipu3/imgu.cpp\n@@ -126,7 +126,7 @@ void calculateBDSHeight(ImgUDevice::Pipe *pipe, const Size &iif, const Size &gdc\n \tunsigned int minIFHeight = iif.height - IF_CROP_MAX_H;\n \tunsigned int minBDSHeight = gdc.height + FILTER_H * 2;\n \tunsigned int ifHeight;\n-\tfloat bdsHeight;\n+\tfloat bdsHeight = 0.0f;\n \n \tif (!isSameRatio(pipe->input, gdc)) {\n \t\tunsigned int foundIfHeight = 0;\n",
    "prefixes": [
        "libcamera-devel",
        "1/2"
    ]
}