From 5f06718aaad848a5613b611bf45454832c69ca81 Mon Sep 17 00:00:00 2001 From: jjceresa <32781294+jjceresa@users.noreply.github.com> Date: Mon, 6 Apr 2020 11:15:08 +0200 Subject: [PATCH] Add comment for uninitialized variable. (#39) --- libinstpatch/IpatchConverter.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libinstpatch/IpatchConverter.c b/libinstpatch/IpatchConverter.c index 0b5dc17..81d9b62 100644 --- a/libinstpatch/IpatchConverter.c +++ b/libinstpatch/IpatchConverter.c @@ -216,6 +216,10 @@ ipatch_convert_object_to_type_multi(GObject *object, GType type, GError **err) GList * ipatch_convert_object_to_type_multi_list(GObject *object, GType type, GError **err) { + /* Note: empty is intentionally not initialized. It allows to fix some build on ARM and PPC. + It is save to use, because empty is not accessed in ipatch_convert_object_to_type_multi_set_vlist + when the second last argument is NULL. + */ va_list empty; return (ipatch_convert_object_to_type_multi_set_vlist(object, type, err, NULL, empty)); } @@ -295,6 +299,7 @@ ipatch_convert_object_to_type_multi_set_vlist(GObject *object, GType type, GErro return NULL; } + /* assign properties (if any) */ if(first_property_name) { g_object_set_valist((GObject *)conv, first_property_name, args);