From 37d81a390b400ac1be2d57dda9f3e63748855971 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Mon, 24 Jun 2024 16:26:57 +0300 Subject: apps: Define local functions in anonymous namespace Multiple local functions are 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, move the function declaration to an anonymous namespace. While at it, for consistency, include an existing static function in the namespace and drop the static keyword. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham --- src/apps/qcam/main.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/apps/qcam') diff --git a/src/apps/qcam/main.cpp b/src/apps/qcam/main.cpp index 9846fba5..d0bde141 100644 --- a/src/apps/qcam/main.cpp +++ b/src/apps/qcam/main.cpp @@ -21,6 +21,8 @@ using namespace libcamera; +namespace { + void signalHandler([[maybe_unused]] int signal) { qInfo() << "Exiting"; @@ -52,6 +54,8 @@ OptionsParser::Options parseOptions(int argc, char *argv[]) return options; } +} /* namespace */ + int main(int argc, char **argv) { QApplication app(argc, argv); -- cgit v1.2.1