On Mon, Feb 15, 2016 at 8:46 AM, Mamoru TASAKA <mtas...@fedoraproject.org>
wrote:

> Richard Shaw wrote on 02/15/2016 11:34 PM:
>
>> Can someone point me in the right direction? My package openCOLLADA is
>> FTBFS in rawhide with the following (repeating) error:
>>
>>
>> /builddir/build/BUILD/OpenCOLLADA-3335ac164e68b2512a40914b14c74db260e6ff7d/COLLADABaseUtils/src/COLLADABUURI.cpp:57:2:
>> error: narrowing conversion of '-1' from 'int' to 'char' inside { }
>> [-Wnarrowing]
>>    };
>>
>> I tried using the gcc6 porting guide but I'm not qutie enough of a
>> programmer to understand how to apply it in this case. The offending code
>> is:
>>
>>          const char HEX2DEC[256] = ^M
>>          {^M
>>                  /*       0  1  2  3   4  5  6  7   8  9  A  B   C  D  E
>> F
>> */^M
>>                  /* 0 */ -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1,
>> -1,-1,-1,-1,^M
>>                  /* 1 */ -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1,
>>
>
> <snip>
>
> On _ARM_ (actually build failure seems to be on ARM) char is _unsigned_
> by default, so converting (int)-1 to char on ARM is narrowing conversion
> and C++11 forbids this on list-initialization.
>

Yes, I forgot to mention this was an ARM failure, i686 and x86_64 builds
will complete.


> You can do this when you explicitly cast, like
>  const char HEX2DEC[256] = { (char)-1, ..... }


I almost tried that but thought there might be a better way, I guess not...

Thanks,
Richard
--
devel mailing list
devel@lists.fedoraproject.org
http://lists.fedoraproject.org/admin/lists/devel@lists.fedoraproject.org

Reply via email to