Commit 56234cd0 authored by Christian Beier's avatar Christian Beier

Fix remaining compiler warnings.

parent bf2470ce
...@@ -2,13 +2,6 @@ ...@@ -2,13 +2,6 @@
#include <rfb/rfb.h> #include <rfb/rfb.h>
#include <rfb/keysym.h> #include <rfb/keysym.h>
static int gcd(int x, int y)
{
if (x == 0)
return y;
return gcd((y % x), x);
}
#define CONCAT2(a,b) a##b #define CONCAT2(a,b) a##b
#define CONCAT2E(a,b) CONCAT2(a,b) #define CONCAT2E(a,b) CONCAT2(a,b)
#define CONCAT3(a,b,c) a##b##c #define CONCAT3(a,b,c) a##b##c
......
...@@ -13,6 +13,8 @@ static int maxx=400, maxy=400, bpp=4; ...@@ -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); 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 */ /* 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_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); void linecount (char* frame_buffer);
/* handles mouse events */ /* handles mouse events */
void on_mouse_event (int buttonMask,int x,int y,rfbClientPtr cl); 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) ...@@ -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) */ /* 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; rfbPixelFormat f=s->serverFormat;
int i,j; int i,j;
...@@ -90,7 +92,7 @@ static void draw_primary_colours_generic(rfbScreenInfoPtr s,int x1,int y1,int x2 ...@@ -90,7 +92,7 @@ static void draw_primary_colours_generic(rfbScreenInfoPtr s,int x1,int y1,int x2
rfbDrawPixel(s,i,j,f.blueMax<<f.blueShift); rfbDrawPixel(s,i,j,f.blueMax<<f.blueShift);
} }
static void draw_primary_colours_generic_fast(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)
{ {
rfbPixelFormat f=s->serverFormat; rfbPixelFormat f=s->serverFormat;
int i,j,y3=(y1*2+y2)/3,y4=(y1+y2*2)/3; int i,j,y3=(y1*2+y2)/3,y4=(y1+y2*2)/3;
......
...@@ -96,9 +96,6 @@ ...@@ -96,9 +96,6 @@
* data. * data.
*/ */
/* TODO: put into rfbClient struct */
static char zrleBeforeBuf[rfbZRLETileWidth * rfbZRLETileHeight * 4 + 4];
/* /*
* rfbSendRectEncodingZRLE - send a given rectangle using ZRLE encoding. * rfbSendRectEncodingZRLE - send a given rectangle using ZRLE encoding.
......
...@@ -84,8 +84,6 @@ static const int bitsPerPackedPixel[] = { ...@@ -84,8 +84,6 @@ static const int bitsPerPackedPixel[] = {
0, 1, 2, 2, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 0, 1, 2, 2, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4
}; };
static zrlePaletteHelper paletteHelper;
#endif /* ZRLE_ONCE */ #endif /* ZRLE_ONCE */
void ZRLE_ENCODE_TILE (PIXEL_T* data, int w, int h, zrleOutStream* os, 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, ...@@ -144,11 +142,7 @@ void ZRLE_ENCODE_TILE(PIXEL_T* data, int w, int h, zrleOutStream* os,
PIXEL_T* end = ptr + h * w; PIXEL_T* end = ptr + h * w;
*end = ~*(end-1); /* one past the end is different so the while loop ends */ *end = ~*(end-1); /* one past the end is different so the while loop ends */
#if 0
ph = &paletteHelper;
#else
ph = (zrlePaletteHelper *) paletteHelper; ph = (zrlePaletteHelper *) paletteHelper;
#endif
zrlePaletteHelperInit(ph); zrlePaletteHelperInit(ph);
while (ptr < end) { while (ptr < end) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment