From 7817f9e0cf2fa5f2bf9a1938832600fa95bdeda7 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Mon, 24 Jun 2024 16:26:57 +0300 Subject: test: ipc: unixsocket: Define local function in anonymous namespace 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(+) (limited to 'test/ipc') diff --git a/test/ipc/unixsocket.cpp b/test/ipc/unixsocket.cpp index f44ab9c9..2546882d 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: -- cgit v1.2.1