summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2024-06-24 16:26:57 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2024-06-26 12:07:11 +0300
commit7817f9e0cf2fa5f2bf9a1938832600fa95bdeda7 (patch)
treeb92b260f8848fb02f898ae094035c633854573e3
parent37d81a390b400ac1be2d57dda9f3e63748855971 (diff)
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 <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
-rw-r--r--test/ipc/unixsocket.cpp4
1 files changed, 4 insertions, 0 deletions
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: