Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LuaJIT warnings when building with them enabled #5319

Open
Buristan opened this issue Sep 21, 2020 · 0 comments
Open

LuaJIT warnings when building with them enabled #5319

Buristan opened this issue Sep 21, 2020 · 0 comments

Comments

@Buristan
Copy link
Collaborator

There are a lot of warnings like:

...
lj_str.c: In function 'lj_str_new':
lj_str.c:184:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
  184 |   MSize h = lua_hash(str, len);
      |   ^~~~~
lj_asm.c: In function 'asm_setup_regsp':
lj_asm.c:2132:10: warning: this statement may fall through [-Wimplicit-fallthrough=]
 2132 |       if (REGARG_NUMGPR < 3 && as->evenspill < 3)
      |          ^
lj_asm.c:2141:5: note: here
 2141 |     case IR_CNEW:
      |     ^~~~

...

when build LuaJIT with enable additional warnings:

# Uncomment the next line to enable more warnings:
CCWARN+= -Wextra -Wdeclaration-after-statement -Wredundant-decls -Wshadow -Wpointer-arith

Should we drop some of them like -Wdeclaration-after-statement and fix the others, shouldn't we?

@kyukhin kyukhin added the teamL label Jul 22, 2021
@kyukhin kyukhin added this to the wishlist milestone Jul 22, 2021
@igormunkin igormunkin removed the teamL label Sep 15, 2022
@kyukhin kyukhin removed this from the wishlist milestone Sep 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants