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:
parent
7bccf57383
commit
d167f9bc06
|
@ -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);
|
ret = send_mono_rect(vs, x, y, w, h, bg, fg);
|
||||||
} else if (colors <= 256) {
|
} else if (colors <= 256) {
|
||||||
ret = send_palette_rect(vs, x, y, w, h, palette);
|
ret = send_palette_rect(vs, x, y, w, h, palette);
|
||||||
|
} else {
|
||||||
|
ret = 0;
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue