Skip to content

Commit d501ff0

Browse files
committed
libvncclient: fix logging format specifiers
1 parent 2b11dfb commit d501ff0

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

src/libvncclient/ultra.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,9 @@ HandleUltraBPP (rfbClient* client, int rx, int ry, int rw, int rh)
100100

101101
/* Note that uncompressedBytes will be 0 on output overrun */
102102
if ((rw * rh * (BPP / 8)) != uncompressedBytes)
103-
rfbClientLogEx(client, "Ultra decompressed unexpected amount of data (%d != %d)\n", (rw * rh * (BPP / 8)), uncompressedBytes);
103+
rfbClientLogEx(client, "Ultra decompressed unexpected amount of data (%lu != %lu)\n",
104+
(unsigned long)(rw * rh * (BPP / 8)),
105+
(unsigned long)uncompressedBytes);
104106

105107
/* Put the uncompressed contents of the update on the screen. */
106108
if ( inflateResult == LZO_E_OK )

src/libvncclient/zrle.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,9 @@ static int HandleZRLETile(rfbClient* client,
270270
int i,j;
271271

272272
if(1+w*h*REALBPP/8>buffer_length) {
273-
rfbClientLogEx(client, "expected %d bytes, got only %d (%dx%d)\n",1+w*h*REALBPP/8,buffer_length,w,h);
273+
rfbClientLogEx(client, "expected %lu bytes, got only %lu (%dx%d)\n",
274+
(unsigned long)(1 + w * h * REALBPP / 8),
275+
(unsigned long)buffer_length, w, h);
274276
return -3;
275277
}
276278

0 commit comments

Comments
 (0)