{"id":1853,"url":"https://patchwork.libcamera.org/api/1.1/patches/1853/?format=json","web_url":"https://patchwork.libcamera.org/patch/1853/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/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":"<20190819170249.11177-1-laurent.pinchart@ideasonboard.com>","date":"2019-08-19T17:02:48","name":"[libcamera-devel,v2,1/2] libcamera: process: Properly ignore unused result with gcc","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"e701ad141435c948ab1d0f607385a9e0409dbb01","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/1.1/people/2/?format=json","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/1853/mbox/","series":[{"id":466,"url":"https://patchwork.libcamera.org/api/1.1/series/466/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=466","date":"2019-08-19T17:02:48","name":"[libcamera-devel,v2,1/2] libcamera: process: Properly ignore unused result with gcc","version":2,"mbox":"https://patchwork.libcamera.org/series/466/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/1853/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/1853/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 AA9C560C1E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 19 Aug 2019 19:02:58 +0200 (CEST)","from pendragon.bb.dnainternet.fi\n\t(dfj612yhrgyx302h3jwwy-3.rev.dnainternet.fi\n\t[IPv6:2001:14ba:21f5:5b00:ce28:277f:58d7:3ca4])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 2E90F510\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 19 Aug 2019 19:02:58 +0200 (CEST)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1566234178;\n\tbh=6xsj+Kq80Z609TFHGYbAqyZ/9YH2OvUVN8AMA8ltOIQ=;\n\th=From:To:Subject:Date:From;\n\tb=sAiEtdnNksZHN2or2N3juQAT2GNntL0LmsSdsTBP+tedfKHyOJuL7XDnEMu+7J0RX\n\tq7p3McURXdIsytnTxfWfotbOep0k029CWCJEF4oWh+n6ic4ig/Q9t//2p3r2YM/DFx\n\tuXYIO7bKmZ0re3BvEq8NQVG0fNoxK6zm1H5v/3ss=","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"libcamera-devel@lists.libcamera.org","Date":"Mon, 19 Aug 2019 20:02:48 +0300","Message-Id":"<20190819170249.11177-1-laurent.pinchart@ideasonboard.com>","X-Mailer":"git-send-email 2.21.0","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v2 1/2] libcamera: process: Properly\n\tignore unused result with gcc","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.23","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":"Mon, 19 Aug 2019 17:02:58 -0000"},"content":"Casting the return value of a function to (void) doesn't ignore the\nunused result warning with gcc. Use a #pragma to fix this properly, to\nfix compilation with _FORTIFY_SOURCE.\n\nFixes: df23ab95f3d7 (\"libcamera: process: fix compilation on Chromium OS\")\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/libcamera/process.cpp | 11 ++++++++---\n 1 file changed, 8 insertions(+), 3 deletions(-)","diff":"diff --git a/src/libcamera/process.cpp b/src/libcamera/process.cpp\nindex ab716a9cd57f..3b4d0f10da67 100644\n--- a/src/libcamera/process.cpp\n+++ b/src/libcamera/process.cpp\n@@ -68,10 +68,15 @@ namespace {\n \n void sigact(int signal, siginfo_t *info, void *ucontext)\n {\n+#pragma GCC diagnostic push\n+#pragma GCC diagnostic ignored \"-Wunused-result\"\n+\t/*\n+\t * We're in a signal handler so we can't log any message, and we need\n+\t * to continue anyway.\n+\t */\n \tchar data = 0;\n-\t/* We're in a signal handler so we can't log any message,\n-\t * and we need to continue anyway. */\n-\t(void)write(ProcessManager::instance()->writePipe(), &data, sizeof(data));\n+\twrite(ProcessManager::instance()->writePipe(), &data, sizeof(data));\n+#pragma GCC diagnostic pop\n \n \tconst struct sigaction &oldsa = ProcessManager::instance()->oldsa();\n \tif (oldsa.sa_flags & SA_SIGINFO) {\n","prefixes":["libcamera-devel","v2","1/2"]}