mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-11-18 02:20:59 +03:00
Fix maybe uninitialized variable warning
Commit 1c2358c12
restructured this code and introduced a warning
about the variable maybe not being initialized. This cannot happen
with the updated code but we should initialize the variable anyway
to silence the warning.
zpl_file.c: In function ‘zpl_iter_write’:
zpl_file.c:324:9: warning: ‘count’ may be used uninitialized
in this function [-Wmaybe-uninitialized]
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #11373
This commit is contained in:
parent
188950df9e
commit
401ba57ccd
@ -318,7 +318,7 @@ zpl_iter_write(struct kiocb *kiocb, struct iov_iter *from)
|
||||
struct file *filp = kiocb->ki_filp;
|
||||
struct inode *ip = filp->f_mapping->host;
|
||||
uio_t uio;
|
||||
size_t count;
|
||||
size_t count = 0;
|
||||
ssize_t ret;
|
||||
|
||||
ret = zpl_generic_write_checks(kiocb, from, &count);
|
||||
|
Loading…
Reference in New Issue
Block a user