mirror of https://github.com/CGAL/cgal
Merge pull request #4326 from lrineau/ImageIO-fix_warnings-lrineau
ImageIO: fix warnings
This commit is contained in:
commit
436d5cba52
|
|
@ -201,7 +201,7 @@ static void addimgtag(byte *dptr, int xsize, int ysize)
|
||||||
/*****************************************************/
|
/*****************************************************/
|
||||||
static unsigned short getshort( const _image *im)
|
static unsigned short getshort( const _image *im)
|
||||||
{
|
{
|
||||||
byte buf[2];
|
byte buf[2] = { '\0', '\0' };
|
||||||
ImageIO_read( im, buf, (size_t) 2);
|
ImageIO_read( im, buf, (size_t) 2);
|
||||||
return (unsigned short)((buf[0]<<8)+(buf[1]<<0));
|
return (unsigned short)((buf[0]<<8)+(buf[1]<<0));
|
||||||
}
|
}
|
||||||
|
|
@ -209,7 +209,7 @@ static unsigned short getshort( const _image *im)
|
||||||
/*****************************************************/
|
/*****************************************************/
|
||||||
static unsigned long getlong( const _image *im )
|
static unsigned long getlong( const _image *im )
|
||||||
{
|
{
|
||||||
byte buf[4];
|
byte buf[4] = { '\0', '\0', '\0', '\0' };
|
||||||
ImageIO_read( im, buf, (size_t) 4);
|
ImageIO_read( im, buf, (size_t) 4);
|
||||||
return (((unsigned long) buf[0])<<24) + (((unsigned long) buf[1])<<16)
|
return (((unsigned long) buf[0])<<24) + (((unsigned long) buf[1])<<16)
|
||||||
+ (((unsigned long) buf[2])<<8) + buf[3];
|
+ (((unsigned long) buf[2])<<8) + buf[3];
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue