Fix GCC11-only errors and warnings

This commit is contained in:
Tamás Bálint Misius 2021-08-04 16:58:44 +02:00
parent dd300e79d1
commit 483fde0698
No known key found for this signature in database
GPG Key ID: 5B472A12F6ECA9F2
3 changed files with 5 additions and 2 deletions

View File

@ -175,7 +175,7 @@ if copt_msvc
project_c_args += args_msvc
project_cpp_args += args_msvc
else
args_ccomp = [ '-U__STRICT_ANSI__', '-Wno-unused-result' ]
args_ccomp = [ '-Wno-unused-result' ]
if copt_platform == 'mac'
if uopt_x86_sse_level >= 0
message('SSE level explicitly configured but unavailable on macosx')

View File

@ -1,5 +1,6 @@
#pragma once
#include <cstddef>
#include <vector>
enum BZ2WCompressResult

View File

@ -99,7 +99,9 @@ static int bit_bnot(lua_State *L) { BRET(~barg(L, 1)) }
#define BIT_OP(func, opr) \
static int func(lua_State *L) { int i; UBits b = barg(L, 1); \
for (i = lua_gettop(L); i > 1; i--) b opr barg(L, i); BRET(b) }
for (i = lua_gettop(L); i > 1; i--) b opr barg(L, i); \
BRET(b) \
}
BIT_OP(bit_band, &=)
BIT_OP(bit_bor, |=)
BIT_OP(bit_bxor, ^=)