models is array of chars. char's signess is implementation specific.

It's unsigned on ARMv7. Unsigned char cannot represent negative values.
GCC 6 complains about it:

    narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing]

This can be reproduced with older GCC or by:

   ./configure CXXFLAGS='-Wnarrowing -funsigned-char'

This patch casts the negative values explicitly because changing the
type to signed char[] would change prototypes of public methods.

Signed-off-by: Petr Písař <ppisar@redhat.com>
This commit is contained in:
Con Kolivas 2016-06-09 15:25:49 +10:00
parent 7e92f4cb47
commit d78c3bbd7a

View file

@ -1458,23 +1458,23 @@ void Compressor::startBlock(int level) {
// Model 2 - mid.cfg
69,0,3,3,0,0,8,3,5,8,13,0,8,17,1,8,
18,2,8,18,3,8,19,4,4,22,24,7,16,0,7,24,
-1,0,17,104,74,4,95,1,59,112,10,25,59,112,10,25,
(char)-1,0,17,104,74,4,95,1,59,112,10,25,59,112,10,25,
59,112,10,25,59,112,10,25,59,112,10,25,59,10,59,112,
25,69,-49,8,112,56,0,
25,69,(char)-49,8,112,56,0,
// Model 3 - max.cfg
-60,0,5,9,0,0,22,1,-96,3,5,8,13,1,8,16,
(char)-60,0,5,9,0,0,22,1,(char)-96,3,5,8,13,1,8,16,
2,8,18,3,8,19,4,8,19,5,8,20,6,4,22,24,
3,17,8,19,9,3,13,3,13,3,13,3,14,7,16,0,
15,24,-1,7,8,0,16,10,-1,6,0,15,16,24,0,9,
8,17,32,-1,6,8,17,18,16,-1,9,16,19,32,-1,6,
15,24,(char)-1,7,8,0,16,10,(char)-1,6,0,15,16,24,0,9,
8,17,32,(char)-1,6,8,17,18,16,(char)-1,9,16,19,32,(char)-1,6,
0,19,20,16,0,0,17,104,74,4,95,2,59,112,10,25,
59,112,10,25,59,112,10,25,59,112,10,25,59,112,10,25,
59,10,59,112,10,25,59,112,10,25,69,-73,32,-17,64,47,
14,-25,91,47,10,25,60,26,48,-122,-105,20,112,63,9,70,
-33,0,39,3,25,112,26,52,25,25,74,10,4,59,112,25,
10,4,59,112,25,10,4,59,112,25,65,-113,-44,72,4,59,
112,8,-113,-40,8,68,-81,60,60,25,69,-49,9,112,25,25,
59,10,59,112,10,25,59,112,10,25,69,(char)-73,32,(char)-17,64,47,
14,(char)-25,91,47,10,25,60,26,48,(char)-122,(char)-105,20,112,63,9,70,
(char)-33,0,39,3,25,112,26,52,25,25,74,10,4,59,112,25,
10,4,59,112,25,10,4,59,112,25,65,(char)-113,(char)-44,72,4,59,
112,8,(char)-113,(char)-40,8,68,(char)-81,60,60,25,69,(char)-49,9,112,25,25,
25,25,25,112,56,0,
0,0}; // 0,0 = end of list