]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
samdb: Fix build error with gcc8
authorAndreas Schneider <asn@samba.org>
Mon, 18 Jun 2018 08:24:06 +0000 (10:24 +0200)
committerKarolin Seeger <kseeger@samba.org>
Tue, 26 Jun 2018 00:26:14 +0000 (02:26 +0200)
../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 <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
(cherry picked from commit 76828876faa3cd463023e323983df0be597c7361)

Autobuild-User(v4-8-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-8-test): Tue Jun 26 02:26:15 CEST 2018 on sn-devel-144

source4/dsdb/samdb/ldb_modules/samldb.c

index 11da629f4ec2f629b875bae6a846b9e1d28e7867..734d0be26a939a7e8753e82a7cd121a24dfcfe10 100644 (file)
@@ -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;