diff --git a/src/Makefile b/src/Makefile index fdfef2b3c..6a56c1dff 100644 --- a/src/Makefile +++ b/src/Makefile @@ -15,7 +15,7 @@ release_hdr := $(shell sh -c './mkreleasehdr.sh') uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not') uname_M := $(shell sh -c 'uname -m 2>/dev/null || echo not') -OPTIMIZATION?=-O2 +OPTIMIZATION?=-O3 -flto DEPENDENCY_TARGETS=hiredis linenoise lua hdr_histogram NODEPS:=clean distclean diff --git a/src/bitops.c b/src/bitops.c index e35001937..23d80554e 100644 --- a/src/bitops.c +++ b/src/bitops.c @@ -1180,7 +1180,9 @@ void bitfieldGeneric(client *c, int flags) { addReplyNull(c); } } else { - uint64_t oldval, newval, wrapped, retval; + /* Initialization of 'wrapped' is required to avoid + * false-positive warning "-Wmaybe-uninitialized" */ + uint64_t oldval, newval, retval, wrapped = 0; int overflow; oldval = getUnsignedBitfield(o->ptr,thisop->offset, diff --git a/src/t_stream.c b/src/t_stream.c index 65a9b5899..454d10b9c 100644 --- a/src/t_stream.c +++ b/src/t_stream.c @@ -747,7 +747,7 @@ int64_t streamTrim(stream *s, streamAddTrimArgs *args) { streamDecodeID(ri.key, &master_id); /* Read last ID. */ - streamID last_id; + streamID last_id = {0,0}; lpGetEdgeStreamID(lp, 0, &master_id, &last_id); /* We can remove the entire node id its last ID < 'id' */