Skip to content

Commit

Permalink
treebrowser: Move cppcheck suppressions inline
Browse files Browse the repository at this point in the history
  • Loading branch information
b4n committed May 2, 2024
1 parent 4280d74 commit d8a6e0c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 0 additions & 2 deletions treebrowser/src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 2 additions & 0 deletions treebrowser/src/treebrowser.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit d8a6e0c

Please sign in to comment.