diff options
author | Toomas Soome <tsoome@me.com> | 2021-04-23 20:27:06 +0300 |
---|---|---|
committer | Toomas Soome <tsoome@me.com> | 2021-06-21 18:49:30 +0300 |
commit | b5358705b92a175b02aad08cd1c6b83dc69e2ae6 (patch) | |
tree | 9554eaa0f697730438de2da68e9fb19b90ed4896 | |
parent | 0d1087e85d1cd423a6cbe5358a51a160350e956e (diff) | |
download | illumos-joyent-b5358705b92a175b02aad08cd1c6b83dc69e2ae6.tar.gz |
13811 libmtmalloc: 'size_nx' may be used uninitialized
Reviewed by: Robert Mustacchi <rm@fingolfin.org>
Approved by: Dan McDonald <danmcd@joyent.com>
-rw-r--r-- | usr/src/lib/libmtmalloc/Makefile.com | 2 | ||||
-rw-r--r-- | usr/src/lib/libmtmalloc/common/mtmalloc.c | 6 |
2 files changed, 3 insertions, 5 deletions
diff --git a/usr/src/lib/libmtmalloc/Makefile.com b/usr/src/lib/libmtmalloc/Makefile.com index e859cee11d..534f01b0aa 100644 --- a/usr/src/lib/libmtmalloc/Makefile.com +++ b/usr/src/lib/libmtmalloc/Makefile.com @@ -40,8 +40,6 @@ CFLAGS += $(CCVERBOSE) $(C_PICFLAGS) CPPFLAGS += -I../common -I../../common/inc -D_REENTRANT DYNFLAGS += $(ZINTERPOSE) -CERRWARN += $(CNOWARN_UNINIT) - .KEEP_STATE: all: $(LIBS) diff --git a/usr/src/lib/libmtmalloc/common/mtmalloc.c b/usr/src/lib/libmtmalloc/common/mtmalloc.c index 0cf998c952..234bb988af 100644 --- a/usr/src/lib/libmtmalloc/common/mtmalloc.c +++ b/usr/src/lib/libmtmalloc/common/mtmalloc.c @@ -1316,9 +1316,9 @@ static void add_oversize(oversize_t *lp) { int merge_flags = INSERT_ONLY; - oversize_t *nx; /* ptr to item right of insertion point */ - oversize_t *pv; /* ptr to item left of insertion point */ - uint_t size_lp, size_pv, size_nx; + oversize_t *nx; /* ptr to item right of insertion point */ + oversize_t *pv; /* ptr to item left of insertion point */ + uint_t size_lp, size_pv, size_nx = 0; uintptr_t endp_lp, endp_pv, endp_nx; /* |