Skip to content

Commit 29e8eb3

Browse files
committed
Let driver.c to compile with gnu11 standard
1 parent b1b6983 commit 29e8eb3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

mqtt/driver.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,8 @@ mosq_subscribe_f(struct mosquitto *mosq __attribute__((unused)),
547547
return;
548548
lua_rawgeti(ctx->L, LUA_REGISTRYINDEX, ctx->subscribe_ref);
549549
lua_pushinteger(ctx->L, mid);
550-
for (int i = 0; i < qos_count; i++)
550+
int i = 0;
551+
for (i = 0; i < qos_count; i++)
551552
lua_pushinteger(ctx->L, granted_qos[i]);
552553
if (lua_pcall(ctx->L, qos_count + 1, 0, 0) != LUA_OK)
553554
say_error("Subscribe callback failed: ref:%d, message: \"%s\"",

0 commit comments

Comments
 (0)