HomeFreeBSD

Fix maybe uninitialized variable warning

Description

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

Details

Provenance
Brian Behlendorf <behlendorf1@llnl.gov>Authored on Dec 20 2020, 5:50 PM
GitHub <noreply@github.com>Committed on Dec 20 2020, 5:50 PM
Parents
rG9ac535e66277: Remove iov_iter_advance() from iter_read
Branches
Unknown
Tags
Unknown

Event Timeline

GitHub <noreply@github.com> committed rG8947fa449503: Fix maybe uninitialized variable warning (authored by Brian Behlendorf <behlendorf1@llnl.gov>).Dec 20 2020, 5:50 PM