[ofono-binder] Fix compilation errors
src/binder_plugin.c: In function 'binder_logger_dump_update_slot':
src/binder_plugin.c:471:5: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
for (RADIO_AIDL_INTERFACE i = 0; i < RADIO_AIDL_INTERFACE_COUNT; i++) {
^
src/binder_plugin.c:471:5: note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your code
src/binder_plugin.c: In function 'binder_logger_trace_update_slot':
src/binder_plugin.c:489:5: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
for (RADIO_AIDL_INTERFACE i = 0; i < RADIO_AIDL_INTERFACE_COUNT; i++) {
^
src/binder_plugin.c: In function 'binder_plugin_is_slot_client_connected':
src/binder_plugin.c:533:5: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
for (RADIO_AIDL_INTERFACE i = 0; i < RADIO_AIDL_INTERFACE_COUNT; i++) {
^
src/binder_plugin.c: In function 'binder_plugin_slot_shutdown':
src/binder_plugin.c:608:13: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
for (RADIO_AIDL_INTERFACE i = 0; i < RADIO_AIDL_INTERFACE_COUNT; i++) {
^
src/binder_plugin.c: In function 'binder_plugin_slot_enabled_changed':
src/binder_plugin.c:787:5: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
for (RADIO_AIDL_INTERFACE i = 0; i < RADIO_AIDL_INTERFACE_COUNT; i++) {
^
make: *** [Makefile:204: build/release/binder_plugin.o] Error 1
This commit is contained in:
@@ -468,7 +468,9 @@ void
|
||||
binder_logger_dump_update_slot(
|
||||
BinderSlot* slot)
|
||||
{
|
||||
for (RADIO_AIDL_INTERFACE i = 0; i < RADIO_AIDL_INTERFACE_COUNT; i++) {
|
||||
RADIO_AIDL_INTERFACE i;
|
||||
|
||||
for (i = 0; i < RADIO_AIDL_INTERFACE_COUNT; i++) {
|
||||
if (binder_logger_dump.flags & OFONO_DEBUG_FLAG_PRINT) {
|
||||
if (!slot->log_dump[i] && slot->instance[i]) {
|
||||
slot->log_dump[i] = binder_logger_new_radio_dump(slot->instance[i],
|
||||
@@ -486,7 +488,9 @@ void
|
||||
binder_logger_trace_update_slot(
|
||||
BinderSlot* slot)
|
||||
{
|
||||
for (RADIO_AIDL_INTERFACE i = 0; i < RADIO_AIDL_INTERFACE_COUNT; i++) {
|
||||
RADIO_AIDL_INTERFACE i;
|
||||
|
||||
for (i = 0; i < RADIO_AIDL_INTERFACE_COUNT; i++) {
|
||||
if (binder_logger_trace.flags & OFONO_DEBUG_FLAG_PRINT) {
|
||||
if (!slot->log_trace[i] && slot->instance[i]) {
|
||||
slot->log_trace[i] = binder_logger_new_radio_trace(slot->instance[i],
|
||||
@@ -530,7 +534,9 @@ gboolean
|
||||
binder_plugin_is_slot_client_connected(
|
||||
BinderSlot* slot)
|
||||
{
|
||||
for (RADIO_AIDL_INTERFACE i = 0; i < RADIO_AIDL_INTERFACE_COUNT; i++) {
|
||||
RADIO_AIDL_INTERFACE i;
|
||||
|
||||
for (i = 0; i < RADIO_AIDL_INTERFACE_COUNT; i++) {
|
||||
if (slot->client[i]) return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
@@ -600,12 +606,14 @@ binder_plugin_slot_shutdown(
|
||||
}
|
||||
|
||||
if (binder_plugin_is_slot_client_connected(slot)) {
|
||||
RADIO_AIDL_INTERFACE i;
|
||||
|
||||
radio_request_drop(slot->caps_check_req);
|
||||
radio_request_drop(slot->imei_req);
|
||||
slot->caps_check_req = NULL;
|
||||
slot->imei_req = NULL;
|
||||
|
||||
for (RADIO_AIDL_INTERFACE i = 0; i < RADIO_AIDL_INTERFACE_COUNT; i++) {
|
||||
for (i = 0; i < RADIO_AIDL_INTERFACE_COUNT; i++) {
|
||||
if (!slot->client[i])
|
||||
continue;
|
||||
|
||||
@@ -783,8 +791,9 @@ binder_plugin_slot_enabled_changed(
|
||||
void* user_data)
|
||||
{
|
||||
BinderSlot* slot = user_data;
|
||||
RADIO_AIDL_INTERFACE i;
|
||||
|
||||
for (RADIO_AIDL_INTERFACE i = 0; i < RADIO_AIDL_INTERFACE_COUNT; i++) {
|
||||
for (i = 0; i < RADIO_AIDL_INTERFACE_COUNT; i++) {
|
||||
if (!slot->instance[i]) continue;
|
||||
|
||||
if (ofono_slot->enabled) {
|
||||
|
||||
Reference in New Issue
Block a user