tiff2ps.c: fix warning caused by integer promotion

uint8 value is promoted to int in (value << 24) so -fsanitize
yield runtime errors :
tiff2ps.c:2969:33: runtime error: left shift of 246 by 24 places cannot be represented in type 'int'
This commit is contained in:
Thomas Bernard 2019-02-11 23:56:05 +01:00
parent 3c792f726b
commit a242136916
No known key found for this signature in database
GPG Key ID: 0FF11B67A5C0863C

View File

@ -2966,10 +2966,10 @@ tsize_t Ascii85EncodeBlock( uint8 * ascii85_p, unsigned f_eod, const uint8 * raw
for ( ; raw_l > 3; raw_l -= 4 )
{
val32 = *(++raw_p) << 24;
val32 += *(++raw_p) << 16;
val32 += *(++raw_p) << 8;
val32 += *(++raw_p);
val32 = (uint32)*(++raw_p) << 24;
val32 += (uint32)*(++raw_p) << 16;
val32 += (uint32)*(++raw_p) << 8;
val32 += (uint32)*(++raw_p);
if ( val32 == 0 ) /* Special case */
{