Unverified Commit 448c435b authored by YoongHM's avatar YoongHM Committed by GitHub
Browse files

Fix compilation warnings in Lua and jemalloc dependencies (#7785)



- The argument `u` in for `ar` is ignored (and generates warnings since `D` became the default.
  All it does is avoid updating unchanged objects (shouldn't have any impact on our build)
- Enable `LUA_USE_MKSTEMP` to force the use of `mkstemp()` instead of `tmpname()` (which is dead
  code in redis anyway).
- Remove unused variable `c` in `f_parser()`
- Removed misleadingly indented space in `luaL_loadfile()` and ``addfield()`
Co-authored-by: default avatarOran Agra <oran@redislabs.com>
parent ef33252c
...@@ -69,13 +69,13 @@ ifeq ($(uname_S),SunOS) ...@@ -69,13 +69,13 @@ ifeq ($(uname_S),SunOS)
LUA_CFLAGS= -D__C99FEATURES__=1 LUA_CFLAGS= -D__C99FEATURES__=1
endif endif
LUA_CFLAGS+= -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' $(CFLAGS) LUA_CFLAGS+= -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -DLUA_USE_MKSTEMP $(CFLAGS)
LUA_LDFLAGS+= $(LDFLAGS) LUA_LDFLAGS+= $(LDFLAGS)
# lua's Makefile defines AR="ar rcu", which is unusual, and makes it more # lua's Makefile defines AR="ar rcu", which is unusual, and makes it more
# challenging to cross-compile lua (and redis). These defines make it easier # challenging to cross-compile lua (and redis). These defines make it easier
# to fit redis into cross-compilation environments, which typically set AR. # to fit redis into cross-compilation environments, which typically set AR.
AR=ar AR=ar
ARFLAGS=rcu ARFLAGS=rc
lua: .make-prerequisites lua: .make-prerequisites
@printf '%b %b\n' $(MAKECOLOR)MAKE$(ENDCOLOR) $(BINCOLOR)$@$(ENDCOLOR) @printf '%b %b\n' $(MAKECOLOR)MAKE$(ENDCOLOR) $(BINCOLOR)$@$(ENDCOLOR)
......
...@@ -512,7 +512,7 @@ CTARGET='-o $@' ...@@ -512,7 +512,7 @@ CTARGET='-o $@'
LDTARGET='-o $@' LDTARGET='-o $@'
TEST_LD_MODE= TEST_LD_MODE=
EXTRA_LDFLAGS= EXTRA_LDFLAGS=
ARFLAGS='crus' ARFLAGS='crs'
AROUT=' $@' AROUT=' $@'
CC_MM=1 CC_MM=1
......
...@@ -493,7 +493,7 @@ static void f_parser (lua_State *L, void *ud) { ...@@ -493,7 +493,7 @@ static void f_parser (lua_State *L, void *ud) {
Proto *tf; Proto *tf;
Closure *cl; Closure *cl;
struct SParser *p = cast(struct SParser *, ud); struct SParser *p = cast(struct SParser *, ud);
int c = luaZ_lookahead(p->z); luaZ_lookahead(p->z);
luaC_checkGC(L); luaC_checkGC(L);
tf = (luaY_parser)(L, p->z, tf = (luaY_parser)(L, p->z,
&p->buff, p->name); &p->buff, p->name);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment