diff options
Diffstat (limited to 'examples')
-rw-r--r-- | examples/colourmaptest.c | 2 | ||||
-rw-r--r-- | examples/copyrecttest.c | 2 | ||||
-rw-r--r-- | examples/example.c | 2 | ||||
-rw-r--r-- | examples/simple.c | 2 | ||||
-rw-r--r-- | examples/simple15.c | 2 | ||||
-rw-r--r-- | examples/vncev.c | 2 |
6 files changed, 6 insertions, 6 deletions
diff --git a/examples/colourmaptest.c b/examples/colourmaptest.c index 9a86197..156781c 100644 --- a/examples/colourmaptest.c +++ b/examples/colourmaptest.c @@ -21,7 +21,7 @@ int main(int argc,char** argv) bytes[128*3+2]=0; server->colourMap.data.bytes=bytes; - server->frameBuffer=malloc(256*256); + server->frameBuffer=(char*)malloc(256*256); for(i=0;i<256*256;i++) server->frameBuffer[i]=(i/256); diff --git a/examples/copyrecttest.c b/examples/copyrecttest.c index 8186e8e..ff278b4 100644 --- a/examples/copyrecttest.c +++ b/examples/copyrecttest.c @@ -19,7 +19,7 @@ int main(int argc,char** argv) double r,phi; rfbScreenInfoPtr server=rfbGetScreen(&argc,argv,width,height,8,3,4); - server->frameBuffer=malloc(width*height*4); + server->frameBuffer=(char*)malloc(width*height*4); initBackground(server); server->rfbDeferUpdateTime=0; rfbInitServer(server); diff --git a/examples/example.c b/examples/example.c index 23522ab..9a12579 100644 --- a/examples/example.c +++ b/examples/example.c @@ -258,7 +258,7 @@ void MakeRichCursor(rfbScreenInfoPtr rfbScreen) c=rfbScreen->cursor = rfbMakeXCursor(w,h,bitmap,bitmap); c->xhot = 16; c->yhot = 24; - c->richSource = malloc(w*h*bpp); + c->richSource = (char*)malloc(w*h*bpp); for(j=0;j<h;j++) { for(i=0;i<w;i++) { c->richSource[j*w*bpp+i*bpp+0]=i*0xff/w; diff --git a/examples/simple.c b/examples/simple.c index 0d6345f..f6e94dc 100644 --- a/examples/simple.c +++ b/examples/simple.c @@ -3,7 +3,7 @@ int main(int argc,char** argv) { rfbScreenInfoPtr server=rfbGetScreen(&argc,argv,400,300,8,3,4); - server->frameBuffer=malloc(400*300*4); + server->frameBuffer=(char*)malloc(400*300*4); rfbInitServer(server); rfbRunEventLoop(server,-1,FALSE); return(0); diff --git a/examples/simple15.c b/examples/simple15.c index 12583ba..faff4f7 100644 --- a/examples/simple15.c +++ b/examples/simple15.c @@ -10,7 +10,7 @@ int main(int argc,char** argv) rfbScreenInfoPtr server=rfbGetScreen(&argc,argv,400,300,5,3,2); - server->frameBuffer=malloc(400*300*2); + server->frameBuffer=(char*)malloc(400*300*2); f=(uint16_t*)server->frameBuffer; for(j=0;j<300;j++) for(i=0;i<400;i++) diff --git a/examples/vncev.c b/examples/vncev.c index e1f6dcc..34128f7 100644 --- a/examples/vncev.c +++ b/examples/vncev.c @@ -44,7 +44,7 @@ void read_keys() for(j=0,i+=2;(k=hex2number(buffer[i]))>=0;i++) j=j*16+k; if(keys[j&0x3ff]) { - char* x=malloc(1+strlen(keys[j&0x3ff])+1+strlen(buffer+strlen("#define "))); + char* x=(char*)malloc(1+strlen(keys[j&0x3ff])+1+strlen(buffer+strlen("#define "))); strcpy(x,keys[j&0x3ff]); strcat(x,","); strcat(x,buffer+strlen("#define ")); |