From d40647dc0e4966c538062a90e23203a3fba2053e Mon Sep 17 00:00:00 2001 From: richi Date: Tue, 28 Jun 2022 03:36:01 +0200 Subject: [PATCH] lua: lauxlib.c Remove compiler warning: misleading indent MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit gcc gave me the following warning: lauxlib.c: In function ‘luaL_loadfile’: lauxlib.c:577:4: warning: this ‘while’ clause does not guard... [-Wmisleading-indentation] 577 | while ((c = getc(lf.f)) != EOF && c != LUA_SIGNATURE[0]) ; | ^~~~~ lauxlib.c:578:5: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘while’ 578 | lf.extraline = 0; | ^~ Since this was a small thing I decided to fix it quickly. This might be fixed already in upstream lua, in that case, feel free to ignore :) --- lua/lua-5.1.3/src/lauxlib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lua-5.1.3/src/lauxlib.c b/lua/lua-5.1.3/src/lauxlib.c index 10f14e2..751f1e8 100644 --- a/lua/lua-5.1.3/src/lauxlib.c +++ b/lua/lua-5.1.3/src/lauxlib.c @@ -575,7 +575,7 @@ LUALIB_API int luaL_loadfile (lua_State *L, const char *filename) { if (lf.f == NULL) return errfile(L, "reopen", fnameindex); /* skip eventual `#!...' */ while ((c = getc(lf.f)) != EOF && c != LUA_SIGNATURE[0]) ; - lf.extraline = 0; + lf.extraline = 0; } ungetc(c, lf.f); status = lua_load(L, getF, &lf, lua_tostring(L, -1));