[PATCH 2/7] Initialize 'klass' in |_dbus_type_reader_recurse| to NULL

Thomas Zimmermann tdz at users.sourceforge.net
Tue Aug 9 19:18:27 UTC 2016


Initializing 'klass' in |_dbus_type_reader_recurse| avoids a
compile-time warning about the variable being uninitialized.

Signed-off-by: Thomas Zimmermann <tdz at users.sourceforge.net>
---
 dbus/dbus-marshal-recursive.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dbus/dbus-marshal-recursive.c b/dbus/dbus-marshal-recursive.c
index bb39165..d49c4d3 100644
--- a/dbus/dbus-marshal-recursive.c
+++ b/dbus/dbus-marshal-recursive.c
@@ -989,8 +989,8 @@ void
 _dbus_type_reader_recurse (DBusTypeReader *reader,
                            DBusTypeReader *sub)
 {
-  const DBusTypeReaderClass *klass;
   int t;
+  const DBusTypeReaderClass *klass = NULL;
 
   t = _dbus_first_type_in_signature (reader->type_str, reader->type_pos);
 
-- 
2.7.4



More information about the dbus mailing list