aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorDr. David Alan Gilbert <dgilbert@redhat.com>2020-08-27 16:36:52 +0100
committerDr. David Alan Gilbert <dgilbert@redhat.com>2020-10-12 12:39:38 +0100
commit2acf4f8fdd1fb1d7d76fa26e67b39af898df0aed (patch)
tree8bc77cb958bff434a4ad5f2f4a1c5c3f331ce51a /tools
parent2387df497b4b4bcf754eb7398edca82889e2ef54 (diff)
downloadqemu-2acf4f8fdd1fb1d7d76fa26e67b39af898df0aed.zip
qemu-2acf4f8fdd1fb1d7d76fa26e67b39af898df0aed.tar.gz
qemu-2acf4f8fdd1fb1d7d76fa26e67b39af898df0aed.tar.bz2
virtiofsd: Silence gcc warning
Gcc worries fd might be used unset, in reality it's always set if fi is set, and only used if fi is set so it's safe. Initialise it to -1 just to keep gcc happy for now. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Message-Id: <20200827153657.111098-2-dgilbert@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/virtiofsd/passthrough_ll.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/virtiofsd/passthrough_ll.c b/tools/virtiofsd/passthrough_ll.c
index 0b229eb..36ad46e 100644
--- a/tools/virtiofsd/passthrough_ll.c
+++ b/tools/virtiofsd/passthrough_ll.c
@@ -620,7 +620,7 @@ static void lo_setattr(fuse_req_t req, fuse_ino_t ino, struct stat *attr,
struct lo_inode *inode;
int ifd;
int res;
- int fd;
+ int fd = -1;
inode = lo_inode(req, ino);
if (!inode) {