From 709fd1f10b6616f66b52f0f44d11b93dd78e3a91 Mon Sep 17 00:00:00 2001 From: Lucas De Marchi Date: Fri, 8 Nov 2024 15:10:25 -0600 Subject: [PATCH] fixup! WIP: Suppress some leak checks by clang-analyzer --- libkmod/libkmod-config.c | 4 +++- meson.build | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/libkmod/libkmod-config.c b/libkmod/libkmod-config.c index 746f14d5..5dee304f 100644 --- a/libkmod/libkmod-config.c +++ b/libkmod/libkmod-config.c @@ -236,11 +236,13 @@ static void kmod_config_free_alias(struct kmod_config *config, struct kmod_list static int kmod_config_add_blacklist(struct kmod_config *config, const char *modname) { - _cleanup_free_ char *p = strdup(modname); + _cleanup_free_ char *p; struct kmod_list *list; DBG(config->ctx, "modname=%s\n", modname); + [[clang::suppress]] + p = strdup(modname); if (!p) return -ENOMEM; diff --git a/meson.build b/meson.build index b4789df4..c1088598 100644 --- a/meson.build +++ b/meson.build @@ -131,6 +131,7 @@ add_project_arguments( '-Wmissing-prototypes', '-Wnested-externs', '-Wno-unused-parameter', + '-Wno-attributes=clang::suppress', '-Wold-style-definition', '-Wpointer-arith', '-Wredundant-decls',