mirror of https://github.com/CGAL/cgal
fix warnings
This commit is contained in:
parent
52c4437539
commit
127a07b0b1
|
|
@ -246,7 +246,7 @@ int readGisHeader( const char* name,_image* im)
|
|||
|
||||
if ( !fgetns(str, _LGTH_STRING_, im) )
|
||||
{ ImageIO_free( str ); return -1; }
|
||||
status = sscanf( str,"%u %u %u %u", &(im->xdim), &(im->ydim),
|
||||
status = sscanf( str,"%zu %zu %zu %zu", &(im->xdim), &(im->ydim),
|
||||
&(im->zdim), &(im->vdim) );
|
||||
switch ( status ) {
|
||||
case 2 : im->zdim = 1;
|
||||
|
|
@ -635,12 +635,12 @@ int writeGisHeader( const _image* inr )
|
|||
|
||||
/* dimensions
|
||||
*/
|
||||
sprintf( str, "%d %d", inr->xdim, inr->ydim );
|
||||
sprintf( str, "%zu %zu", inr->xdim, inr->ydim );
|
||||
if ( inr->vdim > 1 ) {
|
||||
sprintf( str+strlen(str), " %d %d", inr->zdim, inr->vdim );
|
||||
sprintf( str+strlen(str), " %zu %zu", inr->zdim, inr->vdim );
|
||||
}
|
||||
else if ( inr->zdim > 1 ) {
|
||||
sprintf( str+strlen(str), " %d", inr->zdim );
|
||||
sprintf( str+strlen(str), " %zu", inr->zdim );
|
||||
}
|
||||
sprintf( str+strlen(str), "\n" );
|
||||
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@ int _writeInrimageHeader(const _image *im, ENDIANNESS end) {
|
|||
}
|
||||
|
||||
/* write header information */
|
||||
sprintf(buf, "%s\nXDIM=%i\nYDIM=%i\nZDIM=%i\nVDIM=%d\nTYPE=%s\nPIXSIZE=%i bits\n%sCPU=%s\nVX=%f\nVY=%f\nVZ=%f\n",
|
||||
sprintf(buf, "%s\nXDIM=%zu\nYDIM=%zu\nZDIM=%zu\nVDIM=%zu\nTYPE=%s\nPIXSIZE=%zu bits\n%sCPU=%s\nVX=%f\nVY=%f\nVZ=%f\n",
|
||||
INR4_MAGIC, im->xdim, im->ydim, im->zdim, im->vdim,
|
||||
type, im->wdim*8, scale, endianness, im->vx, im->vy, im->vz);
|
||||
|
||||
|
|
@ -237,16 +237,16 @@ int readInrimageHeader(const char *,_image *im) {
|
|||
while(str[0] != '#' && str[0] != '\0') {
|
||||
|
||||
if(!strncmp(str, "XDIM=", 5)) {
|
||||
if(sscanf(str+5, "%u", &im->xdim) != 1) return -1;
|
||||
if(sscanf(str+5, "%zu", &im->xdim) != 1) return -1;
|
||||
}
|
||||
else if(!strncmp(str, "YDIM=", 5)) {
|
||||
if(sscanf(str+5, "%u", &im->ydim) != 1) return -1;
|
||||
if(sscanf(str+5, "%zu", &im->ydim) != 1) return -1;
|
||||
}
|
||||
else if(!strncmp(str, "ZDIM=", 5)) {
|
||||
if(sscanf(str+5, "%u", &im->zdim) != 1) return -1;
|
||||
if(sscanf(str+5, "%zu", &im->zdim) != 1) return -1;
|
||||
}
|
||||
else if(!strncmp(str, "VDIM=", 5)) {
|
||||
if(sscanf(str+5, "%u", &im->vdim) != 1) return -1;
|
||||
if(sscanf(str+5, "%zu", &im->vdim) != 1) return -1;
|
||||
if(im->vdim == 1) im->vectMode = VM_SCALAR;
|
||||
else im->vectMode = VM_INTERLACED;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -219,7 +219,7 @@ int writePpmImage( char *name,_image *im )
|
|||
ImageIO_write( im, string, strlen( string ) );
|
||||
sprintf( string, "# CREATOR: pnm.c $Revision$ $Date$\n" );
|
||||
ImageIO_write( im, string, strlen( string ) );
|
||||
sprintf( string, "%d %d\n", im->xdim, im->ydim );
|
||||
sprintf( string, "%zu %zu\n", im->xdim, im->ydim );
|
||||
ImageIO_write( im, string, strlen( string ) );
|
||||
max = 0;
|
||||
switch ( im->wdim ) {
|
||||
|
|
@ -527,7 +527,7 @@ int writePgmImage(char *name,_image *im )
|
|||
ImageIO_write( im, string, strlen( string ) );
|
||||
sprintf( string, "# CREATOR: pnm.c $Revision$ $Date$\n" );
|
||||
ImageIO_write( im, string, strlen( string ) );
|
||||
sprintf( string, "%d %d\n", im->xdim, im->ydim );
|
||||
sprintf( string, "%zu %zu\n", im->xdim, im->ydim );
|
||||
ImageIO_write( im, string, strlen( string ) );
|
||||
max = 0;
|
||||
switch ( im->wdim ) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue