diff --git a/cagebreak.c b/cagebreak.c index 8f5c01d..63bb000 100644 --- a/cagebreak.c +++ b/cagebreak.c @@ -545,6 +545,8 @@ main(int argc, char *argv[]) { wl_display_destroy_clients(server.wl_display); end: +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wanalyzer-double-free" for(unsigned int i = 0; server.modes[i] != NULL; ++i) { free(server.modes[i]); } @@ -575,3 +577,4 @@ end: return ret; } +#pragma GCC diagnostic pop diff --git a/meson.build b/meson.build index 40c09d7..f562b3f 100644 --- a/meson.build +++ b/meson.build @@ -11,6 +11,7 @@ add_project_arguments( [ '-DWLR_USE_UNSTABLE', '-Wundef', + '-fanalyzer', '-Wno-unused-parameter', ], language: 'c', diff --git a/view.c b/view.c index 6b0ed87..f90baaf 100644 --- a/view.c +++ b/view.c @@ -223,6 +223,8 @@ view_for_each_popup(struct cg_view *view, wlr_surface_iterator_func_t iterator, view->impl->for_each_popup(view, iterator, data); } +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wanalyzer-null-dereference" void view_unmap(struct cg_view *view) { #if CG_HAS_XWAYLAND @@ -263,6 +265,7 @@ view_unmap(struct cg_view *view) { } } #endif +#pragma GCC diagnostic pop wl_list_remove(&view->link);