diff options
author | Ozan Tezcan <ozantezcan@gmail.com> | 2022-08-14 14:29:05 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-14 14:29:05 +0300 |
commit | c5ff163d53f1e9c1b647c4bf413386015ac4be71 (patch) | |
tree | 95cd4ec407f35f692a53d7ee2f7755cb796fcb40 /deps | |
parent | 8aad2ac35201fd6feadb6f59e7cc0c2afb19129b (diff) | |
download | redis-c5ff163d53f1e9c1b647c4bf413386015ac4be71.tar.gz |
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
Diffstat (limited to 'deps')
-rw-r--r-- | deps/lua/src/ldump.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/deps/lua/src/ldump.c b/deps/lua/src/ldump.c index c9d3d4870..b69a12729 100644 --- a/deps/lua/src/ldump.c +++ b/deps/lua/src/ldump.c @@ -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); |