From b5283c70e3924730b567772105ec6056831a6b53 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Wed, 9 Aug 2017 07:45:04 +0200 Subject: [PATCH] s4:samdb: Fix building Samba with -O3 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit gcc error: ‘result’ may be used uninitialized This wont happen, because ldb will return and error, but the compiler doesn't understand this. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12930 Signed-off-by: Andreas Schneider Reviewed-by: Ralph Boehme --- source4/dsdb/samdb/ldb_modules/vlv_pagination.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source4/dsdb/samdb/ldb_modules/vlv_pagination.c b/source4/dsdb/samdb/ldb_modules/vlv_pagination.c index 5b744e3c181..980177cb05e 100644 --- a/source4/dsdb/samdb/ldb_modules/vlv_pagination.c +++ b/source4/dsdb/samdb/ldb_modules/vlv_pagination.c @@ -436,7 +436,7 @@ static int vlv_results(struct vlv_context *ac) ac->store->num_entries - 1); for (i = first_i; i <= last_i; i++) { - struct ldb_result *result; + struct ldb_result *result = NULL; struct GUID *guid = &ac->store->results[i]; ret = vlv_search_by_dn_guid(ac->module, ac, &result, guid, -- 2.11.4.GIT