From 8b32d297f12ff16bb4139afd0a16548a27ed39b9 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Mon, 18 Jun 2018 10:24:06 +0200 Subject: [PATCH] samdb: Fix build error with gcc8 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit ../source4/dsdb/samdb/ldb_modules/samldb.c: In function ‘samldb_add’: ../source4/dsdb/samdb/ldb_modules/samldb.c:424:6: error: ‘found’ may be used uninitialized in this function [-Werror=maybe-uninitialized] if (found) { ^ ../source4/dsdb/samdb/ldb_modules/samldb.c:348:11: note: ‘found’ was declared here bool ok, found; ^~~~~ BUG: https://bugzilla.samba.org/show_bug.cgi?id=13437 Signed-off-by: Andreas Schneider Reviewed-by: Guenther Deschner (cherry picked from commit 76828876faa3cd463023e323983df0be597c7361) Autobuild-User(v4-8-test): Karolin Seeger Autobuild-Date(v4-8-test): Tue Jun 26 02:26:15 CEST 2018 on sn-devel-144 --- source4/dsdb/samdb/ldb_modules/samldb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source4/dsdb/samdb/ldb_modules/samldb.c b/source4/dsdb/samdb/ldb_modules/samldb.c index 11da629f4ec..734d0be26a9 100644 --- a/source4/dsdb/samdb/ldb_modules/samldb.c +++ b/source4/dsdb/samdb/ldb_modules/samldb.c @@ -345,7 +345,7 @@ static int samldb_generate_next_linkid(struct samldb_ctx *ac, static int samldb_schema_add_handle_linkid(struct samldb_ctx *ac) { int ret; - bool ok, found; + bool ok, found = false; struct ldb_message_element *el; const char *enc_str; const struct dsdb_attribute *attr; -- 2.47.2