[{"id":30062,"web_url":"https://patchwork.libcamera.org/comment/30062/","msgid":"<171926522244.625657.2116565617790510666@ping.linuxembedded.co.uk>","date":"2024-06-24T21:40:22","subject":"Re: [PATCH 08/10] test: ipc: unixsocket: Define local function in\n\tanonymous namespace","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Laurent Pinchart (2024-06-24 20:29:39)\n> A local function in the unixsocket test is defined in the global\n> namespace without the static keyword. This compiles fine for now, but\n> will cause a missing declaration warning when we enable them. To prepare\n> for that, enclose the function declaration in an anonymous namespace.\n> \n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n> ---\n>  test/ipc/unixsocket.cpp | 4 ++++\n>  1 file changed, 4 insertions(+)\n> \n> diff --git a/test/ipc/unixsocket.cpp b/test/ipc/unixsocket.cpp\n> index f44ab9c90e25..2546882da085 100644\n> --- a/test/ipc/unixsocket.cpp\n> +++ b/test/ipc/unixsocket.cpp\n> @@ -34,6 +34,8 @@ using namespace libcamera;\n>  using namespace std;\n>  using namespace std::chrono_literals;\n>  \n> +namespace {\n> +\n>  int calculateLength(int fd)\n>  {\n>         lseek(fd, 0, 0);\n> @@ -43,6 +45,8 @@ int calculateLength(int fd)\n>         return size;\n>  }\n>  \n> +} /* namespace */\n> +\n>  class UnixSocketTestSlave\n>  {\n>  public:\n> -- \n> Regards,\n> \n> Laurent Pinchart\n>","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 ABE5DBD87C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 24 Jun 2024 21:40:27 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 562AD654AC;\n\tMon, 24 Jun 2024 23:40:27 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id CF4F4654AA\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 24 Jun 2024 23:40:25 +0200 (CEST)","from pendragon.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id CB2051650;\n\tMon, 24 Jun 2024 23:40:03 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"YxKTw+P6\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1719265203;\n\tbh=QEryOa8bjz/aWwvzYrkPVcPnLYmSZVvsofbD9PK9y7c=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=YxKTw+P68JnSGxo2cypkjO/9STNtlx43oA4oyOOftTwOOI/pmhPzt9UnMtKvx7E1u\n\tZv/FTQDWOZHoh++/xjmw3RnClDALbK5LjWfRlVKBDTOEwFXvXxl2lYdwYvFoC/4NRF\n\tcPuaGm4YrxlUONDAckqfC0K0eMkfHGwyOdPljXa0=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20240624192941.22943-9-laurent.pinchart@ideasonboard.com>","References":"<20240624192941.22943-1-laurent.pinchart@ideasonboard.com>\n\t<20240624192941.22943-9-laurent.pinchart@ideasonboard.com>","Subject":"Re: [PATCH 08/10] test: ipc: unixsocket: Define local function in\n\tanonymous namespace","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <pobrn@protonmail.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Mon, 24 Jun 2024 22:40:22 +0100","Message-ID":"<171926522244.625657.2116565617790510666@ping.linuxembedded.co.uk>","User-Agent":"alot/0.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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]