projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7bccf57
)
Initialize a variable in all cases
author
Blue Swirl
<blauwirbel@gmail.com>
Tue, 27 Jul 2010 15:34:10 +0000
(15:34 +0000)
committer
Blue Swirl
<blauwirbel@gmail.com>
Tue, 27 Jul 2010 15:34:10 +0000
(15:34 +0000)
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>
ui/vnc-enc-tight.c
patch
|
blob
|
history
diff --git
a/ui/vnc-enc-tight.c
b/ui/vnc-enc-tight.c
index 71f3fa3d395cc573ae5377587bd9ad4424579c6f..4a6aca2d57bc73d6c9f3107b3c38c6eab9514ceb 100644
(file)
--- 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;
}