From 4e9b3ed4126fad653f219334cbca2dbf53ddfc20 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Fri, 23 Nov 2018 12:00:36 +0100 Subject: [PATCH] s3:lib: Fix uninitialized variable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit util_tdb.c:116:7: error: ‘len’ may be used uninitialized in this function [-Werror=maybe-uninitialized] buf += len; ^~ ../../source3/lib/util_tdb.c:44:6: note: ‘len’ was declared here int len; ^~~ Signed-off-by: Andreas Schneider Reviewed-by: Gary Lockyer --- source3/lib/util_tdb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/lib/util_tdb.c b/source3/lib/util_tdb.c index cbcca4df09f..4f2450c5773 100644 --- a/source3/lib/util_tdb.c +++ b/source3/lib/util_tdb.c @@ -41,7 +41,7 @@ static size_t tdb_pack_va(uint8_t *buf, int bufsize, const char *fmt, va_list ap uint32_t d; int i; void *p; - int len; + int len = 0; char *s; char c; uint8_t *buf0 = buf;