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>
This commit is contained in:
Blue Swirl 2010-07-27 15:34:10 +00:00
parent 7bccf57383
commit d167f9bc06
1 changed files with 2 additions and 0 deletions

View File

@ -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;
}