From ec45a19c720b433a2068a1e63e060826c52247a8 Mon Sep 17 00:00:00 2001 From: Michael Vetter Date: Thu, 26 Feb 2026 16:28:00 +0100 Subject: [PATCH] build: enable -fanalyzer for static analysis Enable gccs static analyzer to detect memory bugs at compile-time. This validates our __attribute__((__cleanup__)) macros and improves security when parsing external XMPP data with zero runtime overhead. --- meson.build | 3 +++ 1 file changed, 3 insertions(+) diff --git a/meson.build b/meson.build index 854c8cc3..04ab74d1 100644 --- a/meson.build +++ b/meson.build @@ -69,6 +69,9 @@ if is_debug '-D_FORTIFY_SOURCE=2', '-Og' ], language: 'c') + if cc.get_id() == 'gcc' + add_project_arguments('-fanalyzer', language: 'c') + endif endif if cc.get_id() == 'clang'