* libtiff/tif_dirwrite.c: fix warnings raised by GCC 5 -Wfloat-conversion
This commit is contained in:
parent
cbdc8d8ae9
commit
3318c65cbb
@ -1,3 +1,7 @@
|
||||
2016-09-03 Even Rouault <even.rouault at spatialys.com>
|
||||
|
||||
* libtiff/tif_dirwrite.c: fix warnings raised by GCC 5 -Wfloat-conversion
|
||||
|
||||
2016-08-16 Even Rouault <even.rouault at spatialys.com>
|
||||
|
||||
* tools/tiffcrop.c: fix C99'ism.
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $Id: tif_dirwrite.c,v 1.81 2015-12-18 11:11:00 erouault Exp $ */
|
||||
/* $Id: tif_dirwrite.c,v 1.82 2016-09-02 22:42:00 erouault Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988-1997 Sam Leffler
|
||||
@ -2143,13 +2143,13 @@ TIFFWriteDirectoryTagCheckedRationalArray(TIFF* tif, uint32* ndir, TIFFDirEntry*
|
||||
}
|
||||
else if (*na<1.0)
|
||||
{
|
||||
nb[0]=(uint32)((*na)*0xFFFFFFFF);
|
||||
nb[0]=(uint32)((double)(*na)*0xFFFFFFFF);
|
||||
nb[1]=0xFFFFFFFF;
|
||||
}
|
||||
else
|
||||
{
|
||||
nb[0]=0xFFFFFFFF;
|
||||
nb[1]=(uint32)(0xFFFFFFFF/(*na));
|
||||
nb[1]=(uint32)((double)0xFFFFFFFF/(*na));
|
||||
}
|
||||
}
|
||||
if (tif->tif_flags&TIFF_SWAB)
|
||||
@ -2186,13 +2186,13 @@ TIFFWriteDirectoryTagCheckedSrationalArray(TIFF* tif, uint32* ndir, TIFFDirEntry
|
||||
}
|
||||
else if (*na>-1.0)
|
||||
{
|
||||
nb[0]=-(int32)((-*na)*0x7FFFFFFF);
|
||||
nb[0]=-(int32)((double)(-*na)*0x7FFFFFFF);
|
||||
nb[1]=0x7FFFFFFF;
|
||||
}
|
||||
else
|
||||
{
|
||||
nb[0]=-0x7FFFFFFF;
|
||||
nb[1]=(int32)(0x7FFFFFFF/(-*na));
|
||||
nb[1]=(int32)((double)0x7FFFFFFF/(-*na));
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -2204,13 +2204,13 @@ TIFFWriteDirectoryTagCheckedSrationalArray(TIFF* tif, uint32* ndir, TIFFDirEntry
|
||||
}
|
||||
else if (*na<1.0)
|
||||
{
|
||||
nb[0]=(int32)((*na)*0x7FFFFFFF);
|
||||
nb[0]=(int32)((double)(*na)*0x7FFFFFFF);
|
||||
nb[1]=0x7FFFFFFF;
|
||||
}
|
||||
else
|
||||
{
|
||||
nb[0]=0x7FFFFFFF;
|
||||
nb[1]=(int32)(0x7FFFFFFF/(*na));
|
||||
nb[1]=(int32)((double)0x7FFFFFFF/(*na));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user