[PATCH 10/10] meson: Enable warnings to flag missing declarations

Laurent Pinchart laurent.pinchart at ideasonboard.com
Mon Jun 24 21:29:41 CEST 2024


A recently introduced typo resulted in a function definition not
matching its declaration. As the problem occurred in libipa, and IPA
modules are loaded dynamically and are linked with lazy symbol
resolution, the problem wasn't caught at build time.

To try and catch future similar issues, enable the
-Wmissing-declarations warning.

Suggested-by: Barnabás Pőcze <pobrn at protonmail.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
---
 meson.build | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meson.build b/meson.build
index 0ef4cdaafd76..2acd8c3e8cfe 100644
--- a/meson.build
+++ b/meson.build
@@ -95,6 +95,7 @@ if cc.has_header_symbol('stdlib.h', 'secure_getenv', prefix : '#define _GNU_SOUR
 endif
 
 common_arguments = [
+    '-Wmissing-declarations',
     '-Wshadow',
     '-include', meson.current_build_dir() / 'config.h',
 ]
-- 
Regards,

Laurent Pinchart



More information about the libcamera-devel mailing list