s3/libsmb: clang: Fix 'Value stored to 'create_options' is never read'
authorNoel Power <noel.power@suse.com>
Tue, 13 Aug 2019 14:36:56 +0000 (15:36 +0100)
committerRalph Boehme <slow@samba.org>
Tue, 22 Oct 2019 17:28:27 +0000 (17:28 +0000)
It looks like the create_options are accumulated as the depending on the
failure reasons returned for cli_smb2_create_fnum (except for when a
directory is encountered) this looks like a mistake
Fixes:

source3/libsmb/cli_smb2_fnum.c:1870:3: warning: Value stored to 'create_options' is never read <--[clang]
                create_options |= FILE_DIRECTORY_FILE;
                ^
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/libsmb/cli_smb2_fnum.c

index 535beaab841e4d7c842871ee3ea802b9d870f0c0..15f1420dd8f0a716afdded9ae14be1a88659ef56 100644 (file)
@@ -1876,7 +1876,7 @@ static NTSTATUS get_fnum_from_path(struct cli_state *cli,
                        FILE_ATTRIBUTE_DIRECTORY, /* file attributes */
                        FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE, /* share_access */
                        FILE_OPEN,              /* create_disposition */
-                       FILE_DIRECTORY_FILE,    /* create_options */
+                       create_options,         /* create_options */
                        NULL,
                        pfnum,
                        NULL,