mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2025-12-20 05:40:04 +01:00
Taken from libei, with slight modifications. The general approach is: basic data types use _autofoo_ to call the maching foo function on cleanup. Struct types use _unref_, _destory_, _free_, whichever applies to that struct. Notably: attribute syntax depends on where it's declared [1] so in the following examles only a, b, and d have the autofree attribute: _autofree_ char *a, *b; char *c, _autofree *d; Simplest way to ensure it's all correct to keep the declarations one per line. [1] https://gcc.gnu.org/onlinedocs/gcc/Attribute-Syntax.html#Attribute-Syntax Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1184>
7 lines
409 B
YAML
7 lines
409 B
YAML
# optin.core.unix.Malloc: disabled so we can use __attribute__((cleanup)) without leak complaints
|
|
# optin.core.EnumCastOutOfRange: disabled because we use a lot of "wrong" enum values for testing
|
|
# and internally and don't want those values leak into the public API
|
|
Checks: >
|
|
-clang-analyzer-unix.Malloc,
|
|
-clang-analyzer-optin.core.EnumCastOutOfRange
|
|
WarningsAsErrors: true
|