* [Qemu-devel] [PATCH] qemu-char: Fix compiler warning (-Wuninitialized)
@ 2014-06-25 18:54 Stefan Weil
2014-06-25 19:04 ` Eric Blake
0 siblings, 1 reply; 2+ messages in thread
From: Stefan Weil @ 2014-06-25 18:54 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, Paolo Bonzini, Stefan Weil
qemu-char.c:155:8: warning:
'res' may be used uninitialized in this function [-Wuninitialized]
Signed-off-by: Stefan Weil <sw@weilnetz.de>
---
qemu-char.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/qemu-char.c b/qemu-char.c
index c1ea84c..c65f81f 100644
--- a/qemu-char.c
+++ b/qemu-char.c
@@ -133,7 +133,7 @@ int qemu_chr_fe_write(CharDriverState *s, const uint8_t *buf, int len)
int qemu_chr_fe_write_all(CharDriverState *s, const uint8_t *buf, int len)
{
int offset = 0;
- int res;
+ int res = 0;
qemu_mutex_lock(&s->chr_write_lock);
while (offset < len) {
--
1.7.10.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-06-25 19:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-25 18:54 [Qemu-devel] [PATCH] qemu-char: Fix compiler warning (-Wuninitialized) Stefan Weil
2014-06-25 19:04 ` Eric Blake
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).