mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-05-08 21:58:03 +02:00
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
This commit is contained in:
parent
5b50a18ca9
commit
a48a49b9c9
1 changed files with 2 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue