[Spice-devel] [PATCH 08/11] client/windows: fix several assigned but not used errors
Alon Levy
alevy at redhat.com
Fri Jan 13 03:35:51 PST 2012
---
client/windows/red_window.cpp | 3 +--
common/gdi_canvas.c | 24 +++++++++---------------
2 files changed, 10 insertions(+), 17 deletions(-)
diff --git a/client/windows/red_window.cpp b/client/windows/red_window.cpp
index 981fe9a..89a33c9 100644
--- a/client/windows/red_window.cpp
+++ b/client/windows/red_window.cpp
@@ -179,9 +179,8 @@ LRESULT CALLBACK RedWindow_p::WindowProc(HWND hWnd, UINT message, WPARAM wParam,
switch (message) {
case WM_PAINT: {
PAINTSTRUCT ps;
- HDC hdc;
- hdc = BeginPaint(hWnd, &ps);
+ BeginPaint(hWnd, &ps);
SpicePoint origin = window->get_origin();
SpiceRect r;
r.left = ps.rcPaint.left - origin.x;
diff --git a/common/gdi_canvas.c b/common/gdi_canvas.c
index 64fbbf5..5db3e83 100644
--- a/common/gdi_canvas.c
+++ b/common/gdi_canvas.c
@@ -461,9 +461,6 @@ static void copy_bitmap_alpha(const uint8_t *src_alpha, int height, int width, i
uint8_t i_offset;
int i_count = 0;
int i = 0;
- int width_div_stride;
-
- width_div_stride = width / src_stride;
if (alpha_bits_size == 1) {
i_offset = 1;
@@ -1602,7 +1599,6 @@ static void gdi_canvas_draw_text(SpiceCanvas *spice_canvas, SpiceRect *bbox, Spi
static uint32_t *gdi_get_userstyle(GdiCanvas *canvas, uint8_t nseg, SPICE_FIXED28_4* style, int start_is_gap)
{
- double offset = 0;
uint32_t *local_style;
int i;
@@ -1612,7 +1608,6 @@ static uint32_t *gdi_get_userstyle(GdiCanvas *canvas, uint8_t nseg, SPICE_FIXED2
local_style = spice_new(uint32_t , nseg);
if (start_is_gap) {
- offset = (uint32_t)fix_to_double(*style);
local_style[nseg - 1] = (uint32_t)fix_to_double(*style);
style++;
@@ -1815,24 +1810,23 @@ SpiceCanvas *gdi_canvas_create(int width, int height,
)
{
GdiCanvas *canvas;
- int init_ok;
if (need_init) {
return NULL;
}
canvas = spice_new0(GdiCanvas, 1);
- init_ok = canvas_base_init(&canvas->base, &gdi_canvas_ops,
- width, height, format
+ canvas_base_init(&canvas->base, &gdi_canvas_ops,
+ width, height, format,
#ifdef SW_CANVAS_CACHE
- ,bits_cache
- ,palette_cache
+ bits_cache,
+ palette_cache,
#elif defined(SW_CANVAS_IMAGE_CACHE)
- , bits_cache
+ bits_cache,
#endif
- , surfaces
- , glz_decoder
- , jpeg_decoder
- , zlib_decoder);
+ surfaces,
+ glz_decoder,
+ jpeg_decoder,
+ zlib_decoder);
canvas->dc = dc;
canvas->lock = lock;
return (SpiceCanvas *)canvas;
--
1.7.8.2
More information about the Spice-devel
mailing list