From d8a6e0c0bf66710543783c967664ebbe73a5fea8 Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Tue, 30 Apr 2024 22:56:35 +0200 Subject: [PATCH] treebrowser: Move cppcheck suppressions inline --- treebrowser/src/Makefile.am | 2 -- treebrowser/src/treebrowser.c | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/treebrowser/src/Makefile.am b/treebrowser/src/Makefile.am index 1c0880838..147275e93 100644 --- a/treebrowser/src/Makefile.am +++ b/treebrowser/src/Makefile.am @@ -10,6 +10,4 @@ treebrowser_la_CFLAGS = $(AM_CFLAGS) $(GIO_CFLAGS) \ treebrowser_la_LIBADD = $(COMMONLIBS) $(GIO_LIBS) \ $(top_builddir)/utils/src/libgeanypluginutils.la -AM_CPPCHECKFLAGS = --suppress='doubleFree:$(srcdir)/treebrowser.c' - include $(top_srcdir)/build/cppcheck.mk diff --git a/treebrowser/src/treebrowser.c b/treebrowser/src/treebrowser.c index 0fc8e0191..5441cd047 100644 --- a/treebrowser/src/treebrowser.c +++ b/treebrowser/src/treebrowser.c @@ -1121,6 +1121,7 @@ on_menu_create_new_object(GtkMenuItem *menuitem, const gchar *type) } g_free(uri_new); } + /* cppcheck-suppress doubleFree symbolName=uri */ g_free(uri); } @@ -1192,6 +1193,7 @@ on_menu_refresh(GtkMenuItem *menuitem, gpointer *user_data) } } treebrowser_browse(uri, target_iter); + /* cppcheck-suppress doubleFree symbolName=uri */ g_free(uri); } else