dbus: Fixed warnings

pull/110/head
Olivier Martin 2019-07-07 20:40:12 +02:00 committed by Olivier Martin
parent 046f077085
commit a1ad48f20c
1 changed files with 5 additions and 5 deletions

View File

@ -714,7 +714,7 @@ int gattlib_discover_char_range(gatt_connection_t* connection, int start, int en
continue; continue;
} }
for (characteristic_str = *characteristic_strs; *characteristic_str != NULL; characteristic_str++) { for (characteristic_str = *characteristic_strs; characteristic_str != NULL; characteristic_str++) {
// Object path is in the form '/org/bluez/hci0/dev_DE_79_A2_A1_E9_FA/service0024/char0029'. // Object path is in the form '/org/bluez/hci0/dev_DE_79_A2_A1_E9_FA/service0024/char0029'.
// We convert the last 4 hex characters into the handle // We convert the last 4 hex characters into the handle
sscanf(characteristic_str + strlen(characteristic_str) - 4, "%x", &handle); sscanf(characteristic_str + strlen(characteristic_str) - 4, "%x", &handle);
@ -761,7 +761,7 @@ int gattlib_discover_char_range(gatt_connection_t* connection, int start, int en
continue; continue;
} }
for (characteristic_str = characteristic_strs; *characteristic_str != NULL; characteristic_str++) { for (characteristic_str = *characteristic_strs; characteristic_str != NULL; characteristic_str++) {
// Object path is in the form '/org/bluez/hci0/dev_DE_79_A2_A1_E9_FA/service0024/char0029'. // Object path is in the form '/org/bluez/hci0/dev_DE_79_A2_A1_E9_FA/service0024/char0029'.
// We convert the last 4 hex characters into the handle // We convert the last 4 hex characters into the handle
sscanf(characteristic_str + strlen(characteristic_str) - 4, "%x", &handle); sscanf(characteristic_str + strlen(characteristic_str) - 4, "%x", &handle);
@ -775,15 +775,15 @@ int gattlib_discover_char_range(gatt_connection_t* connection, int start, int en
G_BUS_TYPE_SYSTEM, G_BUS_TYPE_SYSTEM,
G_DBUS_OBJECT_MANAGER_CLIENT_FLAGS_NONE, G_DBUS_OBJECT_MANAGER_CLIENT_FLAGS_NONE,
"org.bluez", "org.bluez",
*characteristic_str, characteristic_str,
NULL, NULL,
&error); &error);
if (characteristic_proxy == NULL) { if (characteristic_proxy == NULL) {
if (error) { if (error) {
fprintf(stderr, "Failed to open characteristic '%s': %s\n", *characteristic_str, error->message); fprintf(stderr, "Failed to open characteristic '%s': %s\n", characteristic_str, error->message);
g_error_free(error); g_error_free(error);
} else { } else {
fprintf(stderr, "Failed to open characteristic '%s'.\n", *characteristic_str); fprintf(stderr, "Failed to open characteristic '%s'.\n", characteristic_str);
} }
continue; continue;
} else { } else {