libcl/smb: clang: Fix 'Value stored to 'next_offset' is never read'
authorNoel Power <noel.power@suse.com>
Mon, 8 Jul 2019 15:19:51 +0000 (15:19 +0000)
committerGary Lockyer <gary@samba.org>
Thu, 11 Jul 2019 04:08:13 +0000 (04:08 +0000)
Fixes:

 libcli/smb/smb2_create_blob.c:146:3: warning: Value stored to 'next_offset' is never read <--[clang]
                next_offset += next_pad;
                ^              ~~~~~~~~
1 warning generated.

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
libcli/smb/smb2_create_blob.c

index 457ed290fbab24fec4a39785b7e8eae85e546edd..bb994f28e2f881e4961cd339fe093bb7ced148fc 100644 (file)
@@ -143,7 +143,6 @@ static NTSTATUS smb2_create_blob_push_one(TALLOC_CTX *mem_ctx, DATA_BLOB *buffer
        memcpy(buffer->data+ofs+blob_offset, blob->data.data, blob->data.length);
        if (next_pad > 0) {
                memset(buffer->data+ofs+next_offset, 0, next_pad);
-               next_offset += next_pad;
        }
 
        return NT_STATUS_OK;