From 7b40341c016ab3b334663d7b8d8f13ec8ca3c7b9 Mon Sep 17 00:00:00 2001 From: Slava Monich Date: Mon, 28 Oct 2024 02:26:28 +0200 Subject: [PATCH] [gbinder-radio] Fix compilation error. JB#61702 src/radio_instance.c: In function 'radio_instance_create': src/radio_instance.c:815:5: error: 'for' loop initial declarations are only allowed in C99 or C11 mode for (guint i = 0; i < num_interfaces && !self; i++) { ^ src/radio_instance.c:815:5: note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your code --- src/radio_instance.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/radio_instance.c b/src/radio_instance.c index 73dcdae..21911cd 100644 --- a/src/radio_instance.c +++ b/src/radio_instance.c @@ -796,7 +796,7 @@ radio_instance_create( RadioInstance* self = NULL; GBinderServiceManager* sm = gbinder_servicemanager_new(dev); const RadioInterfaceDesc* interfaces = NULL; - gsize num_interfaces = 0; + gsize i, num_interfaces = 0; if (!sm) { GERR_("Failed to get ServiceManager on %s", dev); @@ -812,7 +812,7 @@ radio_instance_create( num_interfaces = 1; } - for (guint i = 0; i < num_interfaces && !self; i++) { + for (i = 0; i < num_interfaces && !self; i++) { const RadioInterfaceDesc* desc = interfaces + i; if (desc->version <= max_version) {