Commit f5a25a21 authored by Simon Morlat's avatar Simon Morlat

fix gcc-4.4 warnings

parent 63730222
......@@ -1589,6 +1589,7 @@ mblk_t *ms_load_jpeg_as_yuv(const char *jpgpath, MSVideoSize *reqsize){
mblk_t *m=NULL;
struct stat statbuf;
uint8_t *jpgbuf;
int err;
#if !defined(_MSC_VER)
int fd=open(jpgpath,O_RDONLY);
#else
......@@ -1620,10 +1621,13 @@ mblk_t *ms_load_jpeg_as_yuv(const char *jpgpath, MSVideoSize *reqsize){
return m;
}
#if !defined(_MSC_VER)
read(fd,jpgbuf,statbuf.st_size);
err=read(fd,jpgbuf,statbuf.st_size);
#else
_read(fd,jpgbuf,statbuf.st_size);
err=_read(fd,jpgbuf,statbuf.st_size);
#endif
if (err!=statbuf.st_size){
ms_error("Could not read as much as wanted !");
}
m=jpeg2yuv(jpgbuf,statbuf.st_size,reqsize);
ms_free(jpgbuf);
if (m==NULL)
......
......@@ -175,7 +175,7 @@ int main(int argc, char * argv[])
vs.width=MS_VIDEO_SIZE_CIF_W;
vs.height=MS_VIDEO_SIZE_CIF_H;
if (argc<4) {
printf(usage);
printf("%s",usage);
return -1;
}
for (i=1;i<argc;i++){
......@@ -185,7 +185,7 @@ int main(int argc, char * argv[])
}else if (strcmp(argv[i],"--remote")==0){
i++;
if (!parse_addr(argv[i],ip,sizeof(ip),&remoteport)) {
printf(usage);
printf("%s",usage);
return -1;
}
printf("Remote addr: ip=%s port=%i\n",ip,remoteport);
......
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