diff options
author | Thomas Zimmermann <tdz@users.sourceforge.net> | 2016-08-09 16:48:59 +0200 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2016-08-11 16:41:05 +0100 |
commit | a48a49b9c91b6640ce8e39970adc8601bd7f9293 (patch) | |
tree | ba47c0e9ed5e6716945d91315500168e0f0c4ad2 /dbus/dbus-marshal-recursive.c | |
parent | 5b50a18ca96aa57f3c13ec2f760ec4736c039546 (diff) | |
download | dbus-a48a49b9c91b6640ce8e39970adc8601bd7f9293.tar.gz |
Initialize 'klass' in _dbus_type_reader_recurse to NULL
Initializing 'klass' in _dbus_type_reader_recurse avoids a
compile-time warning about the variable being uninitialized.
Signed-off-by: Thomas Zimmermann <tdz@users.sourceforge.net>
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=97282
Diffstat (limited to 'dbus/dbus-marshal-recursive.c')
-rw-r--r-- | dbus/dbus-marshal-recursive.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/dbus/dbus-marshal-recursive.c b/dbus/dbus-marshal-recursive.c index b58a2830..7fe94b09 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); @@ -1030,6 +1030,7 @@ _dbus_type_reader_recurse (DBusTypeReader *reader, _dbus_assert_not_reached ("don't yet handle recursing into this type"); } + _dbus_assert (klass != NULL); _dbus_assert (klass == all_reader_classes[klass->id]); (* klass->recurse) (sub, reader); |