Bug: https://bugs.freedesktop.org/show_bug.cgi?id=93069
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
#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;
_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)
{
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;
}
}