Commit 6f9a9160 authored by Christian Beier's avatar Christian Beier

Fix some compiler warnings thrown with newer gcc.

parent 413ca0df
......@@ -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,6 +38,7 @@
#define _throw(op, err) { \
printf("ERROR in line %d while %s:\n%s\n", __LINE__, op, err); \
(void)retval; /* silence warning */ \
retval=-1; goto bailout;}
#define _throwunix(m) _throw(m, strerror(errno))
#define _throwtj(m) _throw(m, tjGetErrorStr())
......
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