Show a patch.

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

{
    "id": 3902,
    "url": "https://patchwork.libcamera.org/api/patches/3902/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/3902/",
    "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": "<1591130194-5161-1-git-send-email-madhavan.krishnan@linaro.org>",
    "date": "2020-06-02T20:36:34",
    "name": "[libcamera-devel] libcamera: test: Fixed the compilation issue",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "96b85fab31112b434738c69702d0cad8c3343a83",
    "submitter": {
        "id": 29,
        "url": "https://patchwork.libcamera.org/api/people/29/?format=api",
        "name": "Madhavan Krishnan",
        "email": "madhavan.krishnan@linaro.org"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/3902/mbox/",
    "series": [
        {
            "id": 944,
            "url": "https://patchwork.libcamera.org/api/series/944/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=944",
            "date": "2020-06-02T20:36:34",
            "name": "[libcamera-devel] libcamera: test: Fixed the compilation issue",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/944/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/3902/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/3902/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<madhavan.krishnan@linaro.org>",
        "Received": [
            "from mail-wm1-x341.google.com (mail-wm1-x341.google.com\n\t[IPv6:2a00:1450:4864:20::341])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id E38B3603D0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  2 Jun 2020 22:36:40 +0200 (CEST)",
            "by mail-wm1-x341.google.com with SMTP id r9so4200798wmh.2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 02 Jun 2020 13:36:40 -0700 (PDT)",
            "from mmwg-hackbox.linaro.org.de ([2a01:4f8:10a:2685::2])\n\tby smtp.gmail.com with ESMTPSA id\n\to20sm203715wra.29.2020.06.02.13.36.39\n\t(version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);\n\tTue, 02 Jun 2020 13:36:39 -0700 (PDT)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=linaro.org\n\theader.i=@linaro.org header.b=\"SnLKe7bw\"; \n\tdkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=z3d5dgbgr1v7PagmuvSqgxbVdz0TtYwQAc1OqeSdRmY=;\n\tb=SnLKe7bweM2OOgqdOSZvqk/czPUXMm42kFtnr9KjognC/UFT0LGRUNZmeGHgxbsTzm\n\t/LHyiWr5D/kvvqymdgQVvY76PdFaeK+e5YJlLi+StlsLw1/XcSplfSt87bg4f5c+urnh\n\t6hLIHmpPuloqz3GC/E9rQJ2JltxRqJTxosPJ5bzeLeEeU52WK6HeYD26FBbxbO7Cd/A6\n\tkK2Acuh8aHfoqbCv4DBj5QmG5YCvZkQtFkcCtyA7xbtfsPgewJCkweQ4analGayw93bB\n\tSYQgFNw6By3e+CYH2Kel0iRMyCUPA7exSFayTFxYijEsTo3LXUSDuf5KiJ3BmdkCPiuO\n\tzLVg==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=z3d5dgbgr1v7PagmuvSqgxbVdz0TtYwQAc1OqeSdRmY=;\n\tb=WotIqlUwikMgezR4z6AL0rQVBWRxYzg5FbgNJGiEQ72VVT5oGiNvbZxfbXVeNcT+7O\n\tH+6cjfds322ikhqDKABdKEbH+WfXPnbDaH+62d1O+jnkN3WKiYx+zHXQvWR6GCFSSArT\n\tH2Xi4Ml6YBwDOMXj4WUA67c/Z6lLPz/UUyHNdYlTI1I1T5wvQNisHB4tx2GKU8zCun/A\n\tvN0ZFDS5NUQEXYKyraS7pLth6aOkfcCG6ZWQPY0ACxQJvjxrCZx1gPv1o4YwqlD5zvyf\n\tUCvKUx6qbjlYITShqqIUjs4VS0R3ccVDxHaiQbzZe/ZvLdh/QZ7bG6ZPREX+TucqVq10\n\to8Ow==",
        "X-Gm-Message-State": "AOAM530ABGW9T+Nwrp5hLz1LunUFF8/EHSsnx7duACr56THAkUu7ptZv\n\tjYTFtzZXJD6vsQkGUuo4q1WQdzCplo8=",
        "X-Google-Smtp-Source": "ABdhPJxbUaBkYjqFG0M+ijM+s7uAlUnPF8cubc9AMH9fi8fkSuJfcrqeIwV0/7hsGK1fyb1N+92KSg==",
        "X-Received": "by 2002:a7b:cd04:: with SMTP id f4mr5891419wmj.118.1591130200132;\n\tTue, 02 Jun 2020 13:36:40 -0700 (PDT)",
        "From": "Madhavan Krishnan <madhavan.krishnan@linaro.org>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Cc": "Madhavan Krishnan <madhavan.krishnan@linaro.org>",
        "Date": "Tue,  2 Jun 2020 22:36:34 +0200",
        "Message-Id": "<1591130194-5161-1-git-send-email-madhavan.krishnan@linaro.org>",
        "X-Mailer": "git-send-email 2.7.4",
        "In-Reply-To": "<libcamera: test: Fixed the compilation issue>",
        "References": "<libcamera: test: Fixed the compilation issue>",
        "Subject": "[libcamera-devel] [PATCH] libcamera: test: Fixed the compilation\n\tissue",
        "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": "Tue, 02 Jun 2020 20:36:41 -0000"
    },
    "content": "The return value of write() function is ignored, causing the following\ncompiler error|warning with gcc version 5.4\n\nerror: ignoring return value of 'ssize_t write(int, const void*, size_t)'\n\nFix this by storing the return value of write() and return a test error in\ncase of failure.\n\nReported-by: Coverity CID=284605\n\nSigned-off-by: Madhavan Krishnan <madhavan.krishnan@linaro.org>\n---\n test/file.cpp | 7 +++++--\n 1 file changed, 5 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/test/file.cpp b/test/file.cpp\nindex 6262a6f..e328c01 100644\n--- a/test/file.cpp\n+++ b/test/file.cpp\n@@ -27,13 +27,16 @@ protected:\n \t{\n \t\tfileName_ = \"/tmp/libcamera.test.XXXXXX\";\n \t\tint fd = mkstemp(&fileName_.front());\n+\t\tssize_t ret;\n+\n \t\tif (fd == -1)\n \t\t\treturn TestFail;\n \n-\t\twrite(fd, \"libcamera\", 9);\n+\t\tret = write(fd, \"libcamera\", 9);\n+\n \t\tclose(fd);\n \n-\t\treturn TestPass;\n+\t\treturn ret == 9? TestPass : TestFail;\n \t}\n \n \tint run()\n",
    "prefixes": [
        "libcamera-devel"
    ]
}