From 56234cd0b656de3c8827288f2adf78c9cb12d0c5 Mon Sep 17 00:00:00 2001 From: Christian Beier Date: Thu, 17 Mar 2011 13:32:08 +0100 Subject: [PATCH] Fix remaining compiler warnings. --- examples/rotate.c | 7 ------- examples/zippy.c | 6 ++++-- libvncserver/zrle.c | 3 --- libvncserver/zrleencodetemplate.c | 6 ------ 4 files changed, 4 insertions(+), 18 deletions(-) diff --git a/examples/rotate.c b/examples/rotate.c index 66fca80..e552e4a 100644 --- a/examples/rotate.c +++ b/examples/rotate.c @@ -2,13 +2,6 @@ #include #include -static int gcd(int x, int y) -{ - if (x == 0) - return y; - return gcd((y % x), x); -} - #define CONCAT2(a,b) a##b #define CONCAT2E(a,b) CONCAT2(a,b) #define CONCAT3(a,b,c) a##b##c diff --git a/examples/zippy.c b/examples/zippy.c index 4f793a9..5a5961a 100644 --- a/examples/zippy.c +++ b/examples/zippy.c @@ -13,6 +13,8 @@ static int maxx=400, maxy=400, bpp=4; void blank_framebuffer(char* frame_buffer, int x1, int y1, int x2, int y2); /* displays a red bar, a green bar, and a blue bar */ void draw_primary_colors (char* frame_buffer, int x1, int y1, int x2, int y2); +void draw_primary_colours_generic(rfbScreenInfoPtr s,int x1,int y1,int x2,int y2); +void draw_primary_colours_generic_fast(rfbScreenInfoPtr s,int x1,int y1,int x2,int y2); void linecount (char* frame_buffer); /* handles mouse events */ void on_mouse_event (int buttonMask,int x,int y,rfbClientPtr cl); @@ -76,7 +78,7 @@ void draw_primary_colors (char* frame_buffer, int x1, int y1, int x2, int y2) } /* Dscho's versions (slower, but works for bpp != 3 or 4) */ -static void draw_primary_colours_generic(rfbScreenInfoPtr s,int x1,int y1,int x2,int y2) +void draw_primary_colours_generic(rfbScreenInfoPtr s,int x1,int y1,int x2,int y2) { rfbPixelFormat f=s->serverFormat; int i,j; @@ -90,7 +92,7 @@ static void draw_primary_colours_generic(rfbScreenInfoPtr s,int x1,int y1,int x2 rfbDrawPixel(s,i,j,f.blueMax<serverFormat; int i,j,y3=(y1*2+y2)/3,y4=(y1+y2*2)/3; diff --git a/libvncserver/zrle.c b/libvncserver/zrle.c index e1f1447..80f629c 100644 --- a/libvncserver/zrle.c +++ b/libvncserver/zrle.c @@ -96,9 +96,6 @@ * data. */ -/* TODO: put into rfbClient struct */ - -static char zrleBeforeBuf[rfbZRLETileWidth * rfbZRLETileHeight * 4 + 4]; /* * rfbSendRectEncodingZRLE - send a given rectangle using ZRLE encoding. diff --git a/libvncserver/zrleencodetemplate.c b/libvncserver/zrleencodetemplate.c index 3a6f117..b6de755 100644 --- a/libvncserver/zrleencodetemplate.c +++ b/libvncserver/zrleencodetemplate.c @@ -84,8 +84,6 @@ static const int bitsPerPackedPixel[] = { 0, 1, 2, 2, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 }; -static zrlePaletteHelper paletteHelper; - #endif /* ZRLE_ONCE */ void ZRLE_ENCODE_TILE (PIXEL_T* data, int w, int h, zrleOutStream* os, @@ -144,11 +142,7 @@ void ZRLE_ENCODE_TILE(PIXEL_T* data, int w, int h, zrleOutStream* os, PIXEL_T* end = ptr + h * w; *end = ~*(end-1); /* one past the end is different so the while loop ends */ -#if 0 - ph = &paletteHelper; -#else ph = (zrlePaletteHelper *) paletteHelper; -#endif zrlePaletteHelperInit(ph); while (ptr < end) {