Fix some compiler warnings thrown with newer gcc.

pull/1/head
Christian Beier 13 years ago
parent 413ca0dfef
commit 6f9a9160c4

@ -108,6 +108,7 @@ static const tjscalingfactor sf[NUMSF]={
retval=-1; goto bailout;}
#define getinstance(handle) tjinstance *this=(tjinstance *)handle; \
j_compress_ptr cinfo=NULL; j_decompress_ptr dinfo=NULL; \
(void) cinfo; (void) dinfo; /* silence warnings */ \
if(!this) {snprintf(errStr, JMSG_LENGTH_MAX, "Invalid handle"); \
return -1;} \
cinfo=&this->cinfo; dinfo=&this->dinfo;

@ -228,9 +228,7 @@ void
rfbNewClientConnection(rfbScreenInfoPtr rfbScreen,
int sock)
{
rfbClientPtr cl;
cl = rfbNewClient(rfbScreen,sock);
rfbNewClient(rfbScreen,sock);
}

@ -622,7 +622,8 @@ webSocketsDecodeHybi(rfbClientPtr cl, char *dst, int len)
int i;
unsigned char opcode;
ws_ctx_t *wsctx = (ws_ctx_t *)cl->wsctx;
int flength, fin, fhlen;
int flength, fhlen;
/* int fin; */ /* not used atm */
// rfbLog(" <== %s[%d]: %d cl: %p, wsctx: %p-%p (%d)\n", __func__, gettid(), len, cl, wsctx, (char *)wsctx + sizeof(ws_ctx_t), sizeof(ws_ctx_t));
@ -662,7 +663,7 @@ webSocketsDecodeHybi(rfbClientPtr cl, char *dst, int len)
}
opcode = header->b0 & 0x0f;
fin = (header->b0 & 0x80) >> 7;
/* fin = (header->b0 & 0x80) >> 7; */ /* not used atm */
flength = header->b1 & 0x7f;
/*

@ -38,7 +38,8 @@
#define _throw(op, err) { \
printf("ERROR in line %d while %s:\n%s\n", __LINE__, op, err); \
retval=-1; goto bailout;}
(void)retval; /* silence warning */ \
retval=-1; goto bailout;}
#define _throwunix(m) _throw(m, strerror(errno))
#define _throwtj(m) _throw(m, tjGetErrorStr())
#define _throwbmp(m) _throw(m, bmpgeterr())

Loading…
Cancel
Save