diff options
author | Blue Swirl <blauwirbel@gmail.com> | 2010-07-27 15:34:10 +0000 |
---|---|---|
committer | Blue Swirl <blauwirbel@gmail.com> | 2010-07-27 15:34:10 +0000 |
commit | d167f9bc06a577d6c85b8ed6991c1efe175aae7d (patch) | |
tree | a31f5274249accb2f93d7a2abac2c2e08c995192 /ui | |
parent | 7bccf57383cca60a778d5c543ac80c9f62d89ef2 (diff) | |
download | qemu-d167f9bc06a577d6c85b8ed6991c1efe175aae7d.zip qemu-d167f9bc06a577d6c85b8ed6991c1efe175aae7d.tar.gz qemu-d167f9bc06a577d6c85b8ed6991c1efe175aae7d.tar.bz2 |
Initialize a variable in all cases
Fix a warning with some GCCs:
/src/qemu/ui/vnc-enc-tight.c: In function `send_sub_rect_nojpeg':
/src/qemu/ui/vnc-enc-tight.c:1458: warning: `ret' might be used uninitialized in this function
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'ui')
-rw-r--r-- | ui/vnc-enc-tight.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ui/vnc-enc-tight.c b/ui/vnc-enc-tight.c index 71f3fa3..4a6aca2 100644 --- a/ui/vnc-enc-tight.c +++ b/ui/vnc-enc-tight.c @@ -1469,6 +1469,8 @@ static int send_sub_rect_nojpeg(VncState *vs, int x, int y, int w, int h, ret = send_mono_rect(vs, x, y, w, h, bg, fg); } else if (colors <= 256) { ret = send_palette_rect(vs, x, y, w, h, palette); + } else { + ret = 0; } return ret; } |