qemu-char.c:155:8: warning: 'res' may be used uninitialized in this function [-Wuninitialized]
Signed-off-by: Stefan Weil <[email protected]> --- 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
