From: Noel Power Date: Fri, 9 Aug 2019 15:06:20 +0000 (+0100) Subject: s3/libsmb: clang: Fix 'Value stored during initialization is never read' X-Git-Tag: tevent-0.10.1~118 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0be320393b85003f65d74e4e6a1b867a8d21eb1c;p=thirdparty%2Fsamba.git s3/libsmb: clang: Fix 'Value stored during initialization is never read' Fixes: source3/libsmb/cliquota.c:340:11: warning: Value stored to 'status' during its initialization is never read <--[clang] NTSTATUS status = NT_STATUS_UNSUCCESSFUL; ^~~~~~ ~~~~~~~~~~~~~~~~~~~~~~ source3/libsmb/cliquota.c:357:4: warning: Value stored to 'status' is never read <--[clang] status = NT_STATUS_OK; ^ ~~~~~~~~~~~~ 2 warnings generated. Signed-off-by: Noel Power Reviewed-by: Gary Lockyer Autobuild-User(master): Gary Lockyer Autobuild-Date(master): Wed Aug 28 03:06:42 UTC 2019 on sn-devel-184 --- diff --git a/source3/libsmb/cliquota.c b/source3/libsmb/cliquota.c index 06290afb3ec..45cd3280045 100644 --- a/source3/libsmb/cliquota.c +++ b/source3/libsmb/cliquota.c @@ -353,9 +353,7 @@ cli_set_user_quota(struct cli_state *cli, int quota_fnum, SMB_NTQUOTA_LIST *qtl) * smb1 doesn't send NT_STATUS_NO_MORE_ENTRIES so swallow * this status. */ - if (NT_STATUS_EQUAL(status, NT_STATUS_NO_MORE_ENTRIES)) { - status = NT_STATUS_OK; - } else { + if (!NT_STATUS_EQUAL(status, NT_STATUS_NO_MORE_ENTRIES)) { goto cleanup; } }