diff options
author | Ralf Habacker <ralf.habacker@freenet.de> | 2015-11-22 16:57:16 +0100 |
---|---|---|
committer | Ralf Habacker <ralf.habacker@freenet.de> | 2015-11-23 13:27:26 +0100 |
commit | 8dd04cb4b23f73d8c17e4c97d78eea04d1a2f528 (patch) | |
tree | 791337d5a6aebe3daf79d112a36dc00bf61a1773 /dbus/dbus-string-util.c | |
parent | f3be583b40dadfd78ddefbc9fb3fa182bafde949 (diff) | |
download | dbus-8dd04cb4b23f73d8c17e4c97d78eea04d1a2f528.tar.gz |
Fix several -Wpointer-sign warnings in test_hex_roundtrip() and related types.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=93069
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Diffstat (limited to 'dbus/dbus-string-util.c')
-rw-r--r-- | dbus/dbus-string-util.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/dbus/dbus-string-util.c b/dbus/dbus-string-util.c index 3babc053..5b09a695 100644 --- a/dbus/dbus-string-util.c +++ b/dbus/dbus-string-util.c @@ -120,8 +120,8 @@ _dbus_string_find_byte_backward (const DBusString *str, #include <stdio.h> static void -test_hex_roundtrip (const unsigned char *data, - int len) +test_hex_roundtrip (const char *data, + int len) { DBusString orig; DBusString encoded; @@ -170,8 +170,8 @@ test_hex_roundtrip (const unsigned char *data, _dbus_string_free (&decoded); } -typedef void (* TestRoundtripFunc) (const unsigned char *data, - int len); +typedef void (* TestRoundtripFunc) (const char *data, + int len); static void test_roundtrips (TestRoundtripFunc func) { @@ -200,13 +200,13 @@ test_roundtrips (TestRoundtripFunc func) i = 0; while (i < _DBUS_N_ELEMENTS (buf)) { - buf[i] = i; + buf[i] = (i & 0xff); ++i; } i = 0; while (i < _DBUS_N_ELEMENTS (buf)) { - (* func) (buf, i); + (* func) ((const char *) buf, i); ++i; } } |