From: Noel Power Date: Wed, 10 Jul 2019 11:22:43 +0000 (+0000) Subject: s3/lib: clang: Fix 'passed-by-value struct argument contains uninit-ed data' X-Git-Tag: talloc-2.3.0~73 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e3e9330609b527a101dfde9a1109da7cb389ed32;p=thirdparty%2Fsamba.git s3/lib: clang: Fix 'passed-by-value struct argument contains uninit-ed data' Fixed: g_lock.c:358:21: warning: Passed-by-value struct argument contains uninitialized data (e.g., field: 'pid') <--[clang] state->watch_req = dbwrap_watched_watch_send( ^ 1 warning generated. Signed-off-by: Noel Power Reviewed-by: Gary Lockyer --- diff --git a/source3/lib/g_lock.c b/source3/lib/g_lock.c index d97786b02a3..ef6bbb52613 100644 --- a/source3/lib/g_lock.c +++ b/source3/lib/g_lock.c @@ -347,7 +347,7 @@ struct g_lock_lock_fn_state { static void g_lock_lock_fn(struct db_record *rec, void *private_data) { struct g_lock_lock_fn_state *state = private_data; - struct server_id blocker; + struct server_id blocker = {0}; state->status = g_lock_trylock(rec, state->self, state->state->type, &blocker);