diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2018-07-18 22:05:52 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2018-08-12 14:47:36 +0200 |
commit | 9bc29b59d3c873e39a4bca6981df8bd4b7bc3247 (patch) | |
tree | 4462f6aa1c14d31f6effe9a5b28fc4317e078adc | |
parent | 9f0989ce617f572433841492d06efcf6dbcb9f67 (diff) |
qmicli: remove implicity casts to GDestroyNotify in g_clear_pointer()
GLib is being upgraded to propagate type information in
g_clear_pointer, e.g. so that the using a wrong free/unref method
triggers a warning during build.
Reported by: Michael Catanzaro <mcatanzaro@gnome.org>
https://gitlab.gnome.org/GNOME/glib/issues/1425#note_269299
(cherry picked from commit 89bb9f6c18243b9e01386683566bd0bf2825566c)
-rw-r--r-- | src/qmicli/qmicli-dms.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/qmicli/qmicli-dms.c b/src/qmicli/qmicli-dms.c index 1c363d2..ddb6181 100644 --- a/src/qmicli/qmicli-dms.c +++ b/src/qmicli/qmicli-dms.c @@ -2697,9 +2697,9 @@ static void get_stored_image_result_free (GetStoredImageResult *result) { if (result) { - g_clear_pointer (&result->modem_unique_id, (GDestroyNotify)g_array_unref); + g_clear_pointer (&result->modem_unique_id, g_array_unref); g_free (result->modem_build_id); - g_clear_pointer (&result->pri_unique_id, (GDestroyNotify)g_array_unref); + g_clear_pointer (&result->pri_unique_id, g_array_unref); g_free (result->pri_build_id); g_slice_free (GetStoredImageResult, result); } @@ -3161,10 +3161,10 @@ typedef struct { static void set_firmware_preference_context_clear (SetFirmwarePreferenceContext *firmware_preference_ctx) { - g_clear_pointer (&firmware_preference_ctx->modem_image_id.unique_id, (GDestroyNotify) g_array_unref); + g_clear_pointer (&firmware_preference_ctx->modem_image_id.unique_id, g_array_unref); g_free (firmware_preference_ctx->modem_image_id.build_id); - g_clear_pointer (&firmware_preference_ctx->pri_image_id.unique_id, (GDestroyNotify) g_array_unref); + g_clear_pointer (&firmware_preference_ctx->pri_image_id.unique_id, g_array_unref); g_free (firmware_preference_ctx->pri_image_id.build_id); } |