mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-25 00:10:07 +01:00
The type of the "data" pointer may not be compatible with the type of
the "to_free" / output pointer. This is due to constness, and that we
are unable in C to remove constness from a type.
For example,
{
const char *const *data = ...;
gs_free const char **cpy_to_free = NULL;
const char **cpy;
cpy = nm_memdup_maybe_a (300, data, NM_PTRARRAY_LEN (data) + 1, &cpy_to_free);
}
is prefectly valid , but would not have compiled.
It shows that "data" is not of type "*(&cpy_to_free)", but rather
it might be a non-const pointer of the same type.
Fixes:
|
||
|---|---|---|
| .. | ||
| c-list | ||
| c-rbtree | ||
| c-siphash | ||
| c-stdaux | ||
| n-acd | ||
| nm-glib-aux | ||
| nm-libnm-core-aux | ||
| nm-libnm-core-intern | ||
| nm-std-aux | ||
| nm-udev-aux | ||
| nm-utils | ||
| systemd | ||
| meson.build | ||
| nm-default.h | ||
| nm-meta-setting.c | ||
| nm-meta-setting.h | ||
| nm-test-libnm-utils.h | ||
| nm-test-utils-impl.c | ||
| nm-version-macros.h.in | ||