From patchwork Mon Jun 24 19:29:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 20375 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 336E7BD87C for ; Mon, 24 Jun 2024 19:30:25 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 716A5654BF; Mon, 24 Jun 2024 21:30:24 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="SKdglmMT"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id D4802654B5 for ; Mon, 24 Jun 2024 21:30:14 +0200 (CEST) Received: from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi [81.175.209.231]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id C06BB1650; Mon, 24 Jun 2024 21:29:52 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1719257393; bh=WaH4L3NJ0vi0DBXLJq31p62+/GCmxmIVmgCqAjzse+A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SKdglmMTb0UGFHnhhTFBc5/9aaKIj63rDj/QB2HYu0Y5gbGIPmwOBsOlS7n+lahB2 omIAnuhVuImpd7HqNbDCkB94rNBTBZQ1I4VWE3qCHOj/3U5pGYukqBcA9Gq2Nhn7E5 399cWKwTwTbXJXL1sj3bTYKD/SNlmxEGcQeuO3wU= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Cc: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= Subject: [PATCH 08/10] test: ipc: unixsocket: Define local function in anonymous namespace Date: Mon, 24 Jun 2024 22:29:39 +0300 Message-ID: <20240624192941.22943-9-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.44.2 In-Reply-To: <20240624192941.22943-1-laurent.pinchart@ideasonboard.com> References: <20240624192941.22943-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" A local function in the unixsocket test is defined in the global namespace without the static keyword. This compiles fine for now, but will cause a missing declaration warning when we enable them. To prepare for that, enclose the function declaration in an anonymous namespace. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham --- test/ipc/unixsocket.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/ipc/unixsocket.cpp b/test/ipc/unixsocket.cpp index f44ab9c90e25..2546882da085 100644 --- a/test/ipc/unixsocket.cpp +++ b/test/ipc/unixsocket.cpp @@ -34,6 +34,8 @@ using namespace libcamera; using namespace std; using namespace std::chrono_literals; +namespace { + int calculateLength(int fd) { lseek(fd, 0, 0); @@ -43,6 +45,8 @@ int calculateLength(int fd) return size; } +} /* namespace */ + class UnixSocketTestSlave { public: