Fix remaining compiler warnings.

pull/1/head
Christian Beier 14 years ago
parent bf2470cec6
commit 56234cd0b6

@ -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;
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)
} }
/* 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
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 @@
* 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[] = {
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,
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) {

Loading…
Cancel
Save