From 4969a071bb025d8ed6bd99d7fe95f3c0de439862 Mon Sep 17 00:00:00 2001 From: Ralf Habacker Date: Sun, 22 Nov 2015 17:00:51 +0100 Subject: [PATCH 1/4] Fix warning: "pointer targets in assignment differ in signedness [-Wpointer-sign]". Bug: https://bugs.freedesktop.org/show_bug.cgi?id=93069 --- dbus/dbus-marshal-header.c | 4 ++-- dbus/dbus-marshal-recursive.c | 6 +++--- dbus/dbus-marshal-validate.c | 14 +++++++------- dbus/dbus-sysdeps-win.c | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/dbus/dbus-marshal-header.c b/dbus/dbus-marshal-header.c index 48151c6..73a6152 100644 --- a/dbus/dbus-marshal-header.c +++ b/dbus/dbus-marshal-header.c @@ -1458,7 +1458,7 @@ _dbus_header_toggle_flag (DBusHeader *header, dbus_uint32_t flag, dbus_bool_t value) { - unsigned char *flags_p; + char *flags_p; flags_p = _dbus_string_get_data_len (&header->data, FLAGS_OFFSET, 1); @@ -1479,7 +1479,7 @@ dbus_bool_t _dbus_header_get_flag (DBusHeader *header, dbus_uint32_t flag) { - const unsigned char *flags_p; + const char *flags_p; flags_p = _dbus_string_get_const_data_len (&header->data, FLAGS_OFFSET, 1); diff --git a/dbus/dbus-marshal-recursive.c b/dbus/dbus-marshal-recursive.c index 9ba16e9..87dc725 100644 --- a/dbus/dbus-marshal-recursive.c +++ b/dbus/dbus-marshal-recursive.c @@ -341,8 +341,8 @@ void _dbus_type_signature_next (const char *type_str, int *type_pos) { - const unsigned char *p; - const unsigned char *start; + const char *p; + const char *start; _dbus_assert (type_str != NULL); _dbus_assert (type_pos != NULL); @@ -855,7 +855,7 @@ _dbus_type_reader_read_raw (const DBusTypeReader *reader, { _dbus_assert (!reader->klass->types_only); - *value_location = _dbus_string_get_const_data_len (reader->value_str, + *value_location = (unsigned char *) _dbus_string_get_const_data_len (reader->value_str, reader->value_pos, 0); } diff --git a/dbus/dbus-marshal-validate.c b/dbus/dbus-marshal-validate.c index 9187a3e..3a2b416 100644 --- a/dbus/dbus-marshal-validate.c +++ b/dbus/dbus-marshal-validate.c @@ -52,8 +52,8 @@ _dbus_validate_signature_with_reason (const DBusString *type_str, int type_pos, int len) { - const unsigned char *p; - const unsigned char *end; + const char *p; + const char *end; int last; int struct_depth; int array_depth; @@ -725,7 +725,7 @@ _dbus_validate_body_with_reason (const DBusString *expected_signature, _dbus_type_reader_init_types_only (&reader, expected_signature, expected_signature_start); - p = _dbus_string_get_const_data_len (value_str, value_pos, len); + p = (unsigned char *) _dbus_string_get_const_data_len (value_str, value_pos, len); end = p + len; validity = validate_body_helper (&reader, byte_order, TRUE, 0, p, end, &p); @@ -800,7 +800,7 @@ _dbus_validate_path (const DBusString *str, if (len == 0) return FALSE; - s = _dbus_string_get_const_data (str) + start; + s = (unsigned char *) _dbus_string_get_const_data (str) + start; end = s + len; if (*s != '/') @@ -941,7 +941,7 @@ _dbus_validate_interface (const DBusString *str, return FALSE; last_dot = NULL; - iface = _dbus_string_get_const_data (str) + start; + iface = (unsigned char *) _dbus_string_get_const_data (str) + start; end = iface + len; s = iface; @@ -1015,7 +1015,7 @@ _dbus_validate_member (const DBusString *str, if (len == 0) return FALSE; - member = _dbus_string_get_const_data (str) + start; + member = (unsigned char *) _dbus_string_get_const_data (str) + start; end = member + len; s = member; @@ -1107,7 +1107,7 @@ _dbus_validate_bus_name_full (const DBusString *str, return FALSE; last_dot = NULL; - iface = _dbus_string_get_const_data (str) + start; + iface = (unsigned char *) _dbus_string_get_const_data (str) + start; end = iface + len; s = iface; diff --git a/dbus/dbus-sysdeps-win.c b/dbus/dbus-sysdeps-win.c index 703a86f..4e7e76d 100644 --- a/dbus/dbus-sysdeps-win.c +++ b/dbus/dbus-sysdeps-win.c @@ -600,8 +600,8 @@ _dbus_write_socket_two (DBusSocket fd, _dbus_assert (len2 >= 0); - data1 = _dbus_string_get_const_data_len (buffer1, start1, len1); + data1 = _dbus_string_get_const_data_len (buffer1, start1, len1); if (buffer2 != NULL) data2 = _dbus_string_get_const_data_len (buffer2, start2, len2); else -- 1.8.4.5