You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ag...@apache.org on 2020/03/07 16:33:57 UTC
[incubator-nuttx] branch pr477 updated: nfs: fix warning:
'byteswritten' may be used uninitialized
This is an automated email from the ASF dual-hosted git repository.
aguettouche pushed a commit to branch pr477
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
The following commit(s) were added to refs/heads/pr477 by this push:
new 85eac5c nfs: fix warning: 'byteswritten' may be used uninitialized
85eac5c is described below
commit 85eac5cedbb450a56174fad5a8a653344cc5f1b6
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Sat Mar 7 23:00:14 2020 +0800
nfs: fix warning: 'byteswritten' may be used uninitialized
Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
Change-Id: Iff329c90d2ab10d0094a34fd8680923c89d338b1
---
fs/nfs/nfs_vfsops.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/nfs/nfs_vfsops.c b/fs/nfs/nfs_vfsops.c
index f3f0eed..318494c 100644
--- a/fs/nfs/nfs_vfsops.c
+++ b/fs/nfs/nfs_vfsops.c
@@ -939,7 +939,7 @@ static ssize_t nfs_write(FAR struct file *filep, FAR const char *buffer,
FAR struct nfsnode *np;
ssize_t writesize;
ssize_t bufsize;
- ssize_t byteswritten;
+ ssize_t byteswritten = 0;
size_t reqlen;
FAR uint32_t *ptr;
uint32_t tmp;