From da93d88e30f58d9dfa919982b0625da37c682a27 Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Tue, 20 Oct 2020 21:59:35 +0200 Subject: [PATCH] vfs_gpfs: fix bogus compiler warning MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The next commit adds the first call inside Samba to the VFS function SMB_VFS_FGET_DOS_ATTRIBUTES() and therefor also to vfs_gpfs_fget_dos_attributes(). No idea why gcc is generating this warning: [4127/4716] Compiling source3/modules/vfs_aio_fork.c ../../source3/modules/vfs_gpfs.c: In function ‘vfs_gpfs_fget_dos_attributes’: ../../source3/modules/vfs_gpfs.c:1728:2: error: ‘file_id’ may be used uninitialized in this function [-Werror=maybe-uninitialized] 1728 | update_stat_ex_file_id(&fsp->fsp_name->st, file_id); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated due to -Wfatal-errors. cc1: all warnings being treated as errors This change fixes the error. Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison --- source3/modules/vfs_gpfs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c index 4a8418aa726..ae5e2638115 100644 --- a/source3/modules/vfs_gpfs.c +++ b/source3/modules/vfs_gpfs.c @@ -1819,6 +1819,7 @@ static NTSTATUS vfs_gpfs_fget_dos_attributes(struct vfs_handle_struct *handle, return map_nt_error_from_unix(errno); } + ZERO_STRUCT(file_id); status = vfs_gpfs_get_file_id(&iattr, &file_id); if (!NT_STATUS_IS_OK(status)) { return status; -- 2.47.3