From 483fde069809063f07f88956eddd6d962d19b11c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tam=C3=A1s=20B=C3=A1lint=20Misius?= Date: Wed, 4 Aug 2021 16:58:44 +0200 Subject: [PATCH] Fix GCC11-only errors and warnings --- meson.build | 2 +- src/bzip2/bz2wrap.h | 1 + src/lua/LuaBit.cpp | 4 +++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index 303e578a4..af89919e6 100644 --- a/meson.build +++ b/meson.build @@ -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') diff --git a/src/bzip2/bz2wrap.h b/src/bzip2/bz2wrap.h index 38e37bda2..42523b03b 100644 --- a/src/bzip2/bz2wrap.h +++ b/src/bzip2/bz2wrap.h @@ -1,5 +1,6 @@ #pragma once +#include #include enum BZ2WCompressResult diff --git a/src/lua/LuaBit.cpp b/src/lua/LuaBit.cpp index 6f2afed25..5dae78d3d 100644 --- a/src/lua/LuaBit.cpp +++ b/src/lua/LuaBit.cpp @@ -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, ^=)