From df9e5d3a59d0c8908813b9212a5f430902ee603a Mon Sep 17 00:00:00 2001 From: Ralf Habacker Date: Sun, 22 Nov 2015 19:54:15 +0100 Subject: [PATCH 4/4] Fix warning: "pointer targets in passing argument 2 of '_dbus_unpack_uint32' differ in signedness [-Wpointer-sign]". Bug: https://bugs.freedesktop.org/attachment.cgi?id=120019 --- dbus/dbus-marshal-basic.c | 4 ++-- dbus/dbus-marshal-recursive.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dbus/dbus-marshal-basic.c b/dbus/dbus-marshal-basic.c index 6523166..96d02c0 100644 --- a/dbus/dbus-marshal-basic.c +++ b/dbus/dbus-marshal-basic.c @@ -296,7 +296,7 @@ set_string (DBusString *str, _dbus_assert (_DBUS_ALIGN_VALUE (pos, 4) == (unsigned) pos); old_len = _dbus_unpack_uint32 (byte_order, - _dbus_string_get_const_data_len (str, pos, 4)); + (unsigned char *) _dbus_string_get_const_data_len (str, pos, 4)); new_len = _dbus_string_get_length (&dstr); @@ -468,7 +468,7 @@ _dbus_marshal_read_uint32 (const DBusString *str, _dbus_assert (pos + 4 <= _dbus_string_get_length (str)); return _dbus_unpack_uint32 (byte_order, - _dbus_string_get_const_data (str) + pos); + (unsigned char *) _dbus_string_get_const_data (str) + pos); } /** diff --git a/dbus/dbus-marshal-recursive.c b/dbus/dbus-marshal-recursive.c index 87dc725..381cbc6 100644 --- a/dbus/dbus-marshal-recursive.c +++ b/dbus/dbus-marshal-recursive.c @@ -224,7 +224,7 @@ array_reader_get_array_len (const DBusTypeReader *reader) _dbus_assert (_DBUS_ALIGN_VALUE (len_pos, 4) == (unsigned) len_pos); array_len = _dbus_unpack_uint32 (reader->byte_order, - _dbus_string_get_const_data_len (reader->value_str, len_pos, 4)); + (unsigned char *) _dbus_string_get_const_data_len (reader->value_str, len_pos, 4)); #if RECURSIVE_MARSHAL_READ_TRACE _dbus_verbose (" reader %p len_pos %d array len %u len_offset %d\n", @@ -1934,7 +1934,7 @@ writer_recurse_array (DBusTypeWriter *writer, _dbus_assert (_DBUS_ALIGN_VALUE (sub->u.array.len_pos, 4) == (unsigned) sub->u.array.len_pos); len = _dbus_unpack_uint32 (sub->byte_order, - _dbus_string_get_const_data_len (sub->value_str, + (unsigned char *) _dbus_string_get_const_data_len (sub->value_str, sub->u.array.len_pos, 4)); @@ -2579,7 +2579,7 @@ writer_write_reader_helper (DBusTypeWriter *writer, (unsigned) fixup.len_pos_in_reader); old_len = _dbus_unpack_uint32 (reader->byte_order, - _dbus_string_get_const_data_len (reader->value_str, + (unsigned char *) _dbus_string_get_const_data_len (reader->value_str, fixup.len_pos_in_reader, 4)); if (old_len != fixup.new_len && !append_fixup (fixups, &fixup)) -- 1.8.4.5