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:
parent
3c792f726b
commit
a242136916
@ -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 */
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user