]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s4:torture:vfs:fruit fix Clang compilation issue
authorGary Lockyer <gary@catalyst.net.nz>
Sun, 12 Oct 2025 20:46:16 +0000 (09:46 +1300)
committerMartin Schwenke <martins@samba.org>
Mon, 13 Oct 2025 04:42:16 +0000 (04:42 +0000)
Fix:

[4176/4995] Compiling source4/torture/vfs/fruit.c
../../source4/torture/vfs/fruit.c:7900:2: error: variable 'h' is used
    uninitialized whenever 'if' condition is true
    [-Werror,-Wsometimes-uninitialized]
 7900 |         CHECK_STATUS(status, NT_STATUS_OK);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Mon Oct 13 04:42:16 UTC 2025 on atb-devel-224

source4/torture/vfs/fruit.c

index a6f86cd5edf981e5a839e2e2de23ce9e6b6e94c6..71e7eedfdbd1c42aa7d32e835ea031c9949c0ec2 100644 (file)
@@ -7847,7 +7847,7 @@ static bool test_readonly_exclusive_lock(struct torture_context *tctx,
 {
        NTSTATUS status;
        bool ret = true;
-       struct smb2_handle h;
+       struct smb2_handle h = {};
        struct smb2_create create;
        struct smb2_lock lock;
        struct smb2_lock_element lock_element;