{"id":2847,"url":"https://patchwork.libcamera.org/api/patches/2847/?format=json","web_url":"https://patchwork.libcamera.org/patch/2847/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20200218001405.18232-1-laurent.pinchart@ideasonboard.com>","date":"2020-02-18T00:14:05","name":"[libcamera-devel] qcam: Fix compilation errors with clang-10","commit_ref":"a8be6e94e79f602d543a15afd44ef60e378b138f","pull_url":null,"state":"accepted","archived":false,"hash":"2a11ffbe04270694e0b26365b75bd7c60810497d","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/?format=json","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/2847/mbox/","series":[{"id":683,"url":"https://patchwork.libcamera.org/api/series/683/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=683","date":"2020-02-18T00:14:05","name":"[libcamera-devel] qcam: Fix compilation errors with clang-10","version":1,"mbox":"https://patchwork.libcamera.org/series/683/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/2847/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/2847/checks/","tags":{},"headers":{"Return-Path":"<laurent.pinchart@ideasonboard.com>","Received":["from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id A9C0B60438\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 18 Feb 2020 01:14:27 +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 295DC1220\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 18 Feb 2020 01:14:27 +0100 (CET)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1581984867;\n\tbh=BIlcHxuoKjU2x75KEbyBRDmm95PlpT7ipO4zo24grSI=;\n\th=From:To:Subject:Date:From;\n\tb=nUREP9YfD95WIc5Euz9D9UJcuR06VpBZFGZ4foJgfpocCsvRuQGTkcnctK76p9FRf\n\tE+UQrf8qnSD+/QTNlkwdMCrNGaBwndFflQ8KefU+cyrGXiy3KD33s4Jy2wgLTbCYgh\n\tE8Jeczc3kyNoWIl3yZkBnNWy4WatkI0hUe/6I7Y0=","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"libcamera-devel@lists.libcamera.org","Date":"Tue, 18 Feb 2020 02:14:05 +0200","Message-Id":"<20200218001405.18232-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] qcam: Fix compilation errors with clang-10","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, 18 Feb 2020 00:14:27 -0000"},"content":"clang-10 has introduced the same deprecated-copy warning that appeared\nin gcc-9 and caused build issues with Qt header files. However, the\nclang version seems more sensitive, and detects issues that are not\nfixed in Qt 5.13, unlike gcc-9.\n\nExtend the logic that disables the warning for gcc-9 and Qt < 5.13 to\ncover clang-10 and all Qt versions.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/qcam/meson.build | 13 ++++++-------\n 1 file changed, 6 insertions(+), 7 deletions(-)","diff":"diff --git a/src/qcam/meson.build b/src/qcam/meson.build\nindex 5b877a84da85..5150631b55c8 100644\n--- a/src/qcam/meson.build\n+++ b/src/qcam/meson.build\n@@ -25,13 +25,12 @@ if qt5_dep.found()\n     qt5_cpp_args = [ '-DQT_NO_KEYWORDS' ]\n \n     # gcc 9 introduced a deprecated-copy warning that is triggered by Qt until\n-    # Qt 5.13. Disable it manually.\n-    if cc.get_id() == 'gcc'\n-        gcc_version = cc.version().split('.')\n-        qt5_version = qt5_dep.version().split('.')\n-        if qt5_version[1].to_int() < 13 and gcc_version[0].to_int() >= 9\n-            qt5_cpp_args += [ '-Wno-deprecated-copy' ]\n-        endif\n+    # Qt 5.13. clang 10 introduced the same warning, but detects more issues\n+    # that are not fixed in Qt yet. Disable the warning manually in both cases.\n+    if ((cc.get_id() == 'gcc' and cc.version().version_compare('>=9.0') and\n+         qt5_dep.version().version_compare('<5.13')) or\n+        (cc.get_id() == 'clang' and cc.version().version_compare('>=10.0')))\n+        qt5_cpp_args += [ '-Wno-deprecated-copy' ]\n     endif\n \n     resources = qt5.preprocess(moc_headers: qcam_moc_headers,\n","prefixes":["libcamera-devel"]}