Skip to content

Comments

Fix CppCheck 2.19 support#1535

Merged
b4n merged 2 commits intogeany:masterfrom
b4n:cppcheck-2.19
Feb 1, 2026
Merged

Fix CppCheck 2.19 support#1535
b4n merged 2 commits intogeany:masterfrom
b4n:cppcheck-2.19

Conversation

@b4n
Copy link
Member

@b4n b4n commented Jan 23, 2026

We use it (automatically) in the CI, so we need to patch up to actually work with it.

b4n added 2 commits January 21, 2026 22:54
With it, cppcheck believes the member pointers are leaked:

> ../../../debugger/src/dbm_gdb.c:298:2: warning: Memory leak: item.message [memleak]
>  return g_list_append(queue, (gpointer)item);
>  ^
> ../../../debugger/src/dbm_gdb.c:298:2: warning: Memory leak: item.command [memleak]
>  return g_list_append(queue, (gpointer)item);
>  ^
> ../../../debugger/src/dbm_gdb.c:298:2: warning: Memory leak: item.error_message [memleak]
>  return g_list_append(queue, (gpointer)item);

Removing the cast is enough to make it happy, which is fine as this
cast is not needed.
cppcheck 2.19 now requires function-like macros used in preprocessor
directives to be defined, so add the missing GTK ones until they are
added upstream.

See danmar/cppcheck#8147.
@b4n b4n added this to the 2.2.0 milestone Jan 23, 2026
@b4n b4n requested a review from eht16 January 23, 2026 23:42
@eht16
Copy link
Member

eht16 commented Feb 1, 2026

LGTM

@b4n b4n merged commit ecb9e1c into geany:master Feb 1, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants