From: Andreas Schneider Date: Mon, 18 Jun 2018 08:24:06 +0000 (+0200) Subject: samdb: Fix build error with gcc8 X-Git-Tag: tevent-0.9.37~250 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=76828876faa3cd463023e323983df0be597c7361;p=thirdparty%2Fsamba.git samdb: Fix build error with gcc8 ../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 --- diff --git a/source4/dsdb/samdb/ldb_modules/samldb.c b/source4/dsdb/samdb/ldb_modules/samldb.c index da11ee2180c..a7995e31cc1 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;