Browse Source

Fix remaining compiler warnings.

pull/1/head
Christian Beier 11 years ago
parent
commit
56234cd0b6
  1. 7
      examples/rotate.c
  2. 6
      examples/zippy.c
  3. 3
      libvncserver/zrle.c
  4. 6
      libvncserver/zrleencodetemplate.c

7
examples/rotate.c

@ -2,13 +2,6 @@
#include <rfb/rfb.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 CONCAT2E(a,b) CONCAT2(a,b)
#define CONCAT3(a,b,c) a##b##c

6
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<<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;
int i,j,y3=(y1*2+y2)/3,y4=(y1+y2*2)/3;

3
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.

6
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) {

Loading…
Cancel
Save