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]={ ...@@ -108,6 +108,7 @@ static const tjscalingfactor sf[NUMSF]={
retval=-1; goto bailout;} retval=-1; goto bailout;}
#define getinstance(handle) tjinstance *this=(tjinstance *)handle; \ #define getinstance(handle) tjinstance *this=(tjinstance *)handle; \
j_compress_ptr cinfo=NULL; j_decompress_ptr dinfo=NULL; \ 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"); \ if(!this) {snprintf(errStr, JMSG_LENGTH_MAX, "Invalid handle"); \
return -1;} \ return -1;} \
cinfo=&this->cinfo; dinfo=&this->dinfo; cinfo=&this->cinfo; dinfo=&this->dinfo;
......
...@@ -228,9 +228,7 @@ void ...@@ -228,9 +228,7 @@ void
rfbNewClientConnection(rfbScreenInfoPtr rfbScreen, rfbNewClientConnection(rfbScreenInfoPtr rfbScreen,
int sock) int sock)
{ {
rfbClientPtr cl; rfbNewClient(rfbScreen,sock);
cl = rfbNewClient(rfbScreen,sock);
} }
......
...@@ -622,7 +622,8 @@ webSocketsDecodeHybi(rfbClientPtr cl, char *dst, int len) ...@@ -622,7 +622,8 @@ webSocketsDecodeHybi(rfbClientPtr cl, char *dst, int len)
int i; int i;
unsigned char opcode; unsigned char opcode;
ws_ctx_t *wsctx = (ws_ctx_t *)cl->wsctx; 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)); // 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) ...@@ -662,7 +663,7 @@ webSocketsDecodeHybi(rfbClientPtr cl, char *dst, int len)
} }
opcode = header->b0 & 0x0f; opcode = header->b0 & 0x0f;
fin = (header->b0 & 0x80) >> 7; /* fin = (header->b0 & 0x80) >> 7; */ /* not used atm */
flength = header->b1 & 0x7f; flength = header->b1 & 0x7f;
/* /*
......
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
#define _throw(op, err) { \ #define _throw(op, err) { \
printf("ERROR in line %d while %s:\n%s\n", __LINE__, op, err); \ printf("ERROR in line %d while %s:\n%s\n", __LINE__, op, err); \
(void)retval; /* silence warning */ \
retval=-1; goto bailout;} retval=-1; goto bailout;}
#define _throwunix(m) _throw(m, strerror(errno)) #define _throwunix(m) _throw(m, strerror(errno))
#define _throwtj(m) _throw(m, tjGetErrorStr()) #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