diff options
author | Oran Agra <oran@redislabs.com> | 2022-10-07 21:24:54 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-07 21:24:54 +0300 |
commit | 34e70c13c99cdd2419610443ae84287a3080d54c (patch) | |
tree | 43171b54d6b0a5bb663be060c48deccb416508b3 /src/ziplist.c | |
parent | 8e1941534388101f7e936bdf1126eda0036eb9fe (diff) | |
download | redis-34e70c13c99cdd2419610443ae84287a3080d54c.tar.gz |
fix arm build warning due to new compiler optimizations (#11362)
Build fails with warnings in ARM CI after adding more aggressive optimizations (#11350)
probably a result of more aggressive inlining
```
ziplist.c: In function ‘pop.constprop’:
ziplist.c:1770:13: error: ‘vlong’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
printf("%lld", vlong);
^~~~~~~~~~~~~~~~~~~~~
```
```
listpack.c: In function ‘lpInsert.constprop’:
listpack.c:406:9: error: argument 2 null where non-null expected [-Werror=nonnull]
memcpy(buf+1,s,len);
^~~~~~~~~~~~~~~~~~~
```
Diffstat (limited to 'src/ziplist.c')
-rw-r--r-- | src/ziplist.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ziplist.c b/src/ziplist.c index 9fa94bf1f..c3aa65633 100644 --- a/src/ziplist.c +++ b/src/ziplist.c @@ -1754,7 +1754,7 @@ static void stress(int pos, int num, int maxsize, int dnum) { static unsigned char *pop(unsigned char *zl, int where) { unsigned char *p, *vstr; unsigned int vlen; - long long vlong; + long long vlong = 0; p = ziplistIndex(zl,where == ZIPLIST_HEAD ? 0 : -1); if (ziplistGet(p,&vstr,&vlen,&vlong)) { |