Browse Source

dbus: Do not use pointer arithmetic with a void pointer

This failed to compile on x86 gcc due to pointer arithmetic on a void
pointer.

Signed-off-by: Samuel Tan <samueltan@google.com>
Samuel Tan 9 years ago
parent
commit
07e3653922
1 changed files with 2 additions and 1 deletions
  1. 2 1
      wpa_supplicant/dbus/dbus_new_handlers.c

+ 2 - 1
wpa_supplicant/dbus/dbus_new_handlers.c

@@ -435,7 +435,8 @@ dbus_bool_t wpas_dbus_simple_array_property_getter(DBusMessageIter *iter,
 
 	for (i = 0; i < array_len; i++) {
 		if (!dbus_message_iter_append_basic(&array_iter, type,
-						    array + i * element_size)) {
+						    (const char *) array +
+						    i * element_size)) {
 			dbus_set_error(error, DBUS_ERROR_FAILED,
 				       "%s: failed to construct message 2.5",
 				       __func__);