diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2010-12-15 18:03:01 +0100 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@redhat.com> | 2010-12-17 19:37:08 +0100 |
commit | 1c1be9d275a0301db93980e3d77f9f7745b7c7d7 (patch) | |
tree | 628e0960a55ed76f238ac45d5766aeb91fc5d69a /common | |
parent | d1a0fe05c723f035846a61c0aa5b4979ad513e69 (diff) |
common: sync with upstream
Diffstat (limited to 'common')
-rw-r--r-- | common/canvas_base.c | 10 | ||||
-rw-r--r-- | common/gdi_canvas.c | 8 | ||||
-rw-r--r-- | common/lines.c | 2 | ||||
-rw-r--r-- | common/lz.c | 2 | ||||
-rw-r--r-- | common/sw_canvas.c | 4 |
5 files changed, 13 insertions, 13 deletions
diff --git a/common/canvas_base.c b/common/canvas_base.c index c2763bc..db83245 100644 --- a/common/canvas_base.c +++ b/common/canvas_base.c @@ -115,7 +115,7 @@ static inline uint32_t canvas_16bpp_to_32bpp(uint32_t color) return ret; } -#ifdef WIN32 +#if defined(WIN32) && defined(GDI_CANVAS) static HDC create_compatible_dc() { HDC dc = CreateCompatibleDC(NULL); @@ -146,7 +146,7 @@ typedef struct QuicData { jmp_buf jmp_env; char message_buf[512]; SpiceChunks *chunks; - int current_chunk; + uint32_t current_chunk; } QuicData; typedef struct CanvasBase { @@ -809,8 +809,8 @@ static pixman_image_t *canvas_get_lz(CanvasBase *canvas, SpiceImage *image, int CANVAS_ERROR("unexpected LZ image type"); } - ASSERT(width == image->descriptor.width); - ASSERT(height == image->descriptor.height); + ASSERT((unsigned)width == image->descriptor.width); + ASSERT((unsigned)height == image->descriptor.height); ASSERT((image->descriptor.type == SPICE_IMAGE_TYPE_LZ_PLT) || (n_comp_pixels == width * height)); #ifdef WIN32 @@ -3309,7 +3309,7 @@ static void unimplemented_op(SpiceCanvas *canvas) inline static void canvas_base_init_ops(SpiceCanvasOps *ops) { void **ops_cast; - int i; + unsigned i; ops_cast = (void **)ops; for (i = 0; i < sizeof(SpiceCanvasOps) / sizeof(void *); i++) { diff --git a/common/gdi_canvas.c b/common/gdi_canvas.c index eda1529..d57aafc 100644 --- a/common/gdi_canvas.c +++ b/common/gdi_canvas.c @@ -16,8 +16,8 @@ License along with this library; if not, see <http://www.gnu.org/licenses/>. */ -#include <Windows.h> -#include <Wingdi.h> +#include <windows.h> +#include <wingdi.h> #include "gdi_canvas.h" #define GDI_CANVAS #include "canvas_base.c" @@ -471,7 +471,7 @@ static void copy_bitmap_alpha(const uint8_t *src_alpha, int height, int width, i alphaval = src_alpha[i]; alphaval = alphaval >> (i_count * i_offset); - alphaval = alphaval &= ((uint8_t)0xff >> (8 - i_offset)); + alphaval &= ((uint8_t)0xff >> (8 - i_offset)); alphaval = ((255 * alphaval) / ((uint8_t)0xff >> (8 - i_offset))); dest_bitmap[x * 4 + 3] = alphaval; @@ -637,7 +637,7 @@ static HBRUSH get_brush(GdiCanvas *canvas, SpiceBrush *brush, RecurciveMutex **b case SPICE_BRUSH_TYPE_PATTERN: { GdiCanvas *gdi_surface = NULL; HBRUSH hbrush; - pixman_image_t *surface; + pixman_image_t *surface = NULL; HDC dc; HBITMAP bitmap; HBITMAP prev_bitmap; diff --git a/common/lines.c b/common/lines.c index d2e997e..1a14c18 100644 --- a/common/lines.c +++ b/common/lines.c @@ -2985,7 +2985,7 @@ miWideDashSegment (GCPtr pGC, double L, l; double k; PolyVertexRec vertices[4]; - PolyVertexRec saveRight, saveBottom; + PolyVertexRec saveRight = { 0 }, saveBottom; PolySlopeRec slopes[4]; PolyEdgeRec left[2], right[2]; LineFaceRec lcapFace, rcapFace; diff --git a/common/lz.c b/common/lz.c index e563584..d0d9511 100644 --- a/common/lz.c +++ b/common/lz.c @@ -633,7 +633,7 @@ void lz_decode(LzContext *lz, LzImageType to_type, uint8_t *buf) Encoder *encoder = (Encoder *)lz; size_t out_size = 0; size_t alpha_size = 0; - int size = 0; + size_t size = 0; if (IS_IMAGE_TYPE_PLT[encoder->type]) { if (to_type == encoder->type) { size = encoder->height * encoder->stride; diff --git a/common/sw_canvas.c b/common/sw_canvas.c index f579b4c..37083df 100644 --- a/common/sw_canvas.c +++ b/common/sw_canvas.c @@ -976,8 +976,8 @@ static void canvas_put_image(SpiceCanvas *spice_canvas, { SwCanvas *canvas = (SwCanvas *)spice_canvas; pixman_image_t *src; - int dest_width; - int dest_height; + uint32_t dest_width; + uint32_t dest_height; double sx, sy; pixman_transform_t transform; |