From 6e31344466e2558a99cd46bb29abaa37e1faffc6 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Thu, 10 Oct 2019 17:17:09 +0100 Subject: [Minor] Fix compile warnings --- contrib/lua-lpeg/lptypes.h | 2 +- contrib/lua-lpeg/lpvm.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'contrib') diff --git a/contrib/lua-lpeg/lptypes.h b/contrib/lua-lpeg/lptypes.h index 7173d11d3..9dee116cd 100644 --- a/contrib/lua-lpeg/lptypes.h +++ b/contrib/lua-lpeg/lptypes.h @@ -154,9 +154,9 @@ typedef struct Charset { /* Special workaround for luajit */ #if defined(WITH_LUAJIT) && !(defined(_X86_) || defined(__x86_64__) || defined(__i386__)) # define LPEG_LUD_WORKAROUND 1 -#endif void * lpeg_allocate_mem_low(size_t sz); void lpeg_free_mem_low(void *p); +#endif #endif diff --git a/contrib/lua-lpeg/lpvm.c b/contrib/lua-lpeg/lpvm.c index 441712826..4ef424579 100644 --- a/contrib/lua-lpeg/lpvm.c +++ b/contrib/lua-lpeg/lpvm.c @@ -17,6 +17,7 @@ #include "lpvm.h" #include "lpprint.h" +#ifdef LPEG_LUD_WORKAROUND #include #define MAX_PIECES (1u << 2u) @@ -119,6 +120,8 @@ lpeg_free_mem_low(void *p) /* No match, unmapped by allocation */ } +#endif + /* initial size for call/backtrack stack */ #if !defined(INITBACK) #define INITBACK MAXBACK -- cgit v1.2.3