diff options
author | Ozan Tezcan <ozantezcan@gmail.com> | 2022-10-06 11:26:19 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-06 11:26:19 +0300 |
commit | b08ebff31f1e3a64ae4c537c3acc40dde7a83976 (patch) | |
tree | ed5f418cd519bbbd3a39edd8b6b5ccb81007039f /src/quicklist.c | |
parent | 663fbd34592aef3d24ac347ad00dbd02f3c7b713 (diff) | |
download | redis-b08ebff31f1e3a64ae4c537c3acc40dde7a83976.tar.gz |
Pass -flto flag to the linker (#11350)
Currently, we add -flto to the compile flags only. We are supposed
to add it to the linker flags as well. Clang build fails because of this.
Added a change to add -flto to REDIS_CFLAGS and REDIS_LDFLAGS
if the build optimization flag is -O3. (noopt build will not use -flto)
Diffstat (limited to 'src/quicklist.c')
-rw-r--r-- | src/quicklist.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/quicklist.c b/src/quicklist.c index e82d8551e..69438165b 100644 --- a/src/quicklist.c +++ b/src/quicklist.c @@ -1573,9 +1573,9 @@ REDIS_STATIC void *_quicklistSaver(unsigned char *data, size_t sz) { * Returns malloc'd value from quicklist */ int quicklistPop(quicklist *quicklist, int where, unsigned char **data, size_t *sz, long long *slong) { - unsigned char *vstr; - size_t vlen; - long long vlong; + unsigned char *vstr = NULL; + size_t vlen = 0; + long long vlong = 0; if (quicklist->count == 0) return 0; int ret = quicklistPopCustom(quicklist, where, &vstr, &vlen, &vlong, |