diff options
author | Thomas Haller <thaller@redhat.com> | 2022-12-01 14:07:22 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2022-12-09 09:15:55 +0100 |
commit | 1bf73642dc47d85aa6b6a2cf092bdb1c942cce0a (patch) | |
tree | d304b937d664fbf845a6c4fcf9e7c29d258ecdde /src/nmcli | |
parent | 67ee711743493fd6cf35e0425231ce33034d29ff (diff) | |
download | NetworkManager-1bf73642dc47d85aa6b6a2cf092bdb1c942cce0a.tar.gz |
all: fix "-Wcast-align=strict" warnings for GArray casts
GArray.data is a char pointer. Most of the time we track other data in
a GArray. Casting that pointer can trigger "-Wcast-align=strict"
warnings.
Avoid them. Most of the time, instead use the nm_g_array*() helpers,
which also assert that the expected element size is correct.
Diffstat (limited to 'src/nmcli')
-rw-r--r-- | src/nmcli/utils.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nmcli/utils.c b/src/nmcli/utils.c index 8eb9fa950a..8bd8da5f9f 100644 --- a/src/nmcli/utils.c +++ b/src/nmcli/utils.c @@ -825,7 +825,7 @@ _output_selection_parse(const NMMetaAbstractInfo *const *fields, _output_selection_complete(cols); *out_cols_len = cols->len; - *out_cols_data = (PrintDataCol *) g_array_free(g_steal_pointer(&cols), FALSE); + *out_cols_data = (PrintDataCol *) ((gpointer) g_array_free(g_steal_pointer(&cols), FALSE)); *out_gfree_keeper = g_steal_pointer(&gfree_keeper); return TRUE; } |