Show a patch.

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

{
    "id": 3035,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/3035/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/3035/",
    "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": "<20200306231141.8071-1-laurent.pinchart@ideasonboard.com>",
    "date": "2020-03-06T23:11:41",
    "name": "[libcamera-devel] gst: Silence -Wunused-function warning for older GLib versions",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "2b3b092487da4f82b059977324dd6ab26ef2f23a",
    "submitter": {
        "id": 2,
        "url": "https://patchwork.libcamera.org/api/1.1/people/2/?format=api",
        "name": "Laurent Pinchart",
        "email": "laurent.pinchart@ideasonboard.com"
    },
    "delegate": {
        "id": 14,
        "url": "https://patchwork.libcamera.org/api/1.1/users/14/?format=api",
        "username": "pinchartl",
        "first_name": "Laurent",
        "last_name": "Pinchart",
        "email": "laurent.pinchart@ideasonboard.com"
    },
    "mbox": "https://patchwork.libcamera.org/patch/3035/mbox/",
    "series": [
        {
            "id": 707,
            "url": "https://patchwork.libcamera.org/api/1.1/series/707/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=707",
            "date": "2020-03-06T23:11:41",
            "name": "[libcamera-devel] gst: Silence -Wunused-function warning for older GLib versions",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/707/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/3035/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/3035/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<laurent.pinchart@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 B607360427\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat,  7 Mar 2020 00:11:47 +0100 (CET)",
            "from pendragon.bb.dnainternet.fi (81-175-216-236.bb.dnainternet.fi\n\t[81.175.216.236])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 3A43D24B;\n\tSat,  7 Mar 2020 00:11:47 +0100 (CET)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1583536307;\n\tbh=rLkRRIwtzfrpS+cPFkv9EHl544Z5nAWJnJj0TCzinrg=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=CnAPQytJxM9ZSWFNf7rvrxOR0VvRT0YteUT66WUH/00TqsIbyYIh6GmdCcGN2RyIv\n\tyr7g4uPiYg0jiMAL6kXOLxw/H1KVz7/g3U/C7Yfl8QMcm4lEz/zlriLgyQ6u55HKSu\n\tsyRqLLUc3EixeUrZOkQThsxo0MkZoGU8CJE36kGg=",
        "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>",
        "To": "Nicolas Dufresne <nicolas.dufresne@collabora.com>",
        "Cc": "libcamera-devel@lists.libcamera.org",
        "Date": "Sat,  7 Mar 2020 01:11:41 +0200",
        "Message-Id": "<20200306231141.8071-1-laurent.pinchart@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.24.1",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH] gst: Silence -Wunused-function warning\n\tfor older GLib versions",
        "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": "Fri, 06 Mar 2020 23:11:47 -0000"
    },
    "content": "The G_DECLARE_FINAL_TYPE macro from GLib creates static inline functions\nthat, prior to GLib v2.63.0, were not marked as possibly unused. This\ncauses clang to complain about the ones we are not using. Silence the\n-Wunused-function warning in that case.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/gstreamer/meson.build | 12 +++++++++++-\n 1 file changed, 11 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/src/gstreamer/meson.build b/src/gstreamer/meson.build\nindex ca64bf110dde..a144d7d2b4eb 100644\n--- a/src/gstreamer/meson.build\n+++ b/src/gstreamer/meson.build\n@@ -13,13 +13,23 @@ libcamera_gst_c_args = [\n     '-DPACKAGE=\"@0@\"'.format(meson.project_name()),\n ]\n \n+glib_dep = dependency('glib', required : get_option('gstreamer'))\n+\n gst_dep_version = '>=1.14.0'\n gstvideo_dep = dependency('gstreamer-video-1.0', version : gst_dep_version,\n                           required : get_option('gstreamer'))\n gstallocator_dep = dependency('gstreamer-allocators-1.0', version : gst_dep_version,\n                               required : get_option('gstreamer'))\n \n-if gstvideo_dep.found() and gstallocator_dep.found()\n+if glib_dep.found() and gstvideo_dep.found() and gstallocator_dep.found()\n+    # The G_DECLARE_FINAL_TYPE macro from GLib creates static inline functions\n+    # that, prior to GLib v2.63.0, were not marked as possibly unused. This\n+    # causes clang to complain about the ones we are not using. Silence the\n+    # -Wunused-function warning in that case.\n+    if cc.get_id() == 'clang' and glib_dep.version().version_compare('<2.63.0')\n+        libcamera_gst_c_args += [ '-Wno-unused-function' ]\n+    endif\n+\n     libcamera_gst = shared_library('gstlibcamera',\n         libcamera_gst_sources,\n         c_args : libcamera_gst_c_args,\n",
    "prefixes": [
        "libcamera-devel"
    ]
}