summaryrefslogtreecommitdiff
path: root/src/nmcli
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2022-12-01 14:07:22 +0100
committerThomas Haller <thaller@redhat.com>2022-12-09 09:15:55 +0100
commit1bf73642dc47d85aa6b6a2cf092bdb1c942cce0a (patch)
treed304b937d664fbf845a6c4fcf9e7c29d258ecdde /src/nmcli
parent67ee711743493fd6cf35e0425231ce33034d29ff (diff)
downloadNetworkManager-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.c2
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;
}