Fix Lua compile warning on GCC 12.1 (#11115)
Fix Lua compile warning on GCC 12.1 GCC 12.1 prints a warning on compile: ``` ldump.c: In function ‘DumpString’: ldump.c:63:26: warning: the comparison will always evaluate as ‘false’ for the pointer operand in ‘s + 24’ must not be NULL [-Waddress] 63 | if (s==NULL || getstr(s)==NULL) ``` It seems correct, `getstr(s)` can't be `NULL`. Also, I see Lua v5.2 does not have that check: https://github.com/lua/lua/blob/v5-2/ldump.c#L63
This commit is contained in:
parent
8aad2ac352
commit
c5ff163d53
2
deps/lua/src/ldump.c
vendored
2
deps/lua/src/ldump.c
vendored
@ -60,7 +60,7 @@ static void DumpVector(const void* b, int n, size_t size, DumpState* D)
|
||||
|
||||
static void DumpString(const TString* s, DumpState* D)
|
||||
{
|
||||
if (s==NULL || getstr(s)==NULL)
|
||||
if (s==NULL)
|
||||
{
|
||||
size_t size=0;
|
||||
DumpVar(size,D);
|
||||
|
Loading…
x
Reference in New Issue
Block a user