s3/libsmb: clang: Fix 'Value stored to 'status' is never read'
authorNoel Power <noel.power@suse.com>
Fri, 9 Aug 2019 15:02:18 +0000 (16:02 +0100)
committerGary Lockyer <gary@samba.org>
Wed, 28 Aug 2019 01:47:40 +0000 (01:47 +0000)
Fixes:

source3/libsmb/cliquota.c:340:11: warning: Value stored to 'status' during its initialization is never read <--[clang]
        NTSTATUS status = NT_STATUS_UNSUCCESSFUL;
                 ^~~~~~   ~~~~~~~~~~~~~~~~~~~~~~
/home/samba/samba/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 <noel.power@suse.com>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
source3/libsmb/cliquota.c

index 17655e095f31a4bfe309cdaaafdf15ba46a52b61..06290afb3ecff70bae869fd3e4d58a181b934a3c 100644 (file)
@@ -337,7 +337,7 @@ cli_set_user_quota(struct cli_state *cli, int quota_fnum, SMB_NTQUOTA_LIST *qtl)
        uint16_t setup[1];
        uint8_t params[2];
        DATA_BLOB data = data_blob_null;
-       NTSTATUS status = NT_STATUS_UNSUCCESSFUL;
+       NTSTATUS status;
 
        if (!cli || !qtl) {
                smb_panic("cli_set_user_quota() called with NULL Pointer!");