zaps166 / QMPlay2

QMPlay2 is a video and audio player which can play most formats and codecs.
GNU Lesser General Public License v3.0
866 stars 180 forks source link

PowerPC: Can't compile due to "-funsigned-char" #25

Closed DAP-DarkneSS closed 8 years ago

DAP-DarkneSS commented 8 years ago

Distro: openSUSE Factory Compiler: gcc6 Arch: ppc64 & ppc64le only. Build log: [ 127s] Rayman2.cpp: In function 'float decode(unsigned char, short int&, int&)': [ 127s] Rayman2.cpp:23:68: error: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing] [ 127s] static const char ima_index_table[8] = {-1, -1, -1, -1, 2, 4, 6, 8}; [ 127s] ^ [ 127s] Rayman2.cpp:23:68: error: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing] [ 127s] Rayman2.cpp:23:68: error: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing] [ 127s] Rayman2.cpp:23:68: error: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing]

zaps166 commented 8 years ago

Looks like -Werror parameter is used.

PowerPC has -funsigned-char as default, so it is my BUG (I should respect it)

zaps166 commented 8 years ago

Fixed, now it uses qint8 which is signed char.

DAP-DarkneSS commented 8 years ago

Thank you!

zaps166 commented 8 years ago

:smiley: But I don't know how does QMPlay2 work on big-endian machines (not tested). Probably it'll be buggy - PPC (and ARM and MIPS) can be also big-endian.

DAP-DarkneSS commented 8 years ago

Me too. Btw I am not really sure that openSUSE users have ppc64 desktops…

zaps166 commented 8 years ago

AFAIK ppc64 (big-endian) is in PlayStation3 (2 cores from Cell CPU) and ppc(big-endian; 32bit?) was on old Apple computers. But probably nobody uses big-endian + QMPlay2 :smiley:

DAP-DarkneSS commented 8 years ago

openSUSE supports now ppc64 and ppc64le (little-endian). The latest is IBM
next generation servers arch afaik.

zaps166 commented 8 years ago

So ppc64 means big-endian. Maybe I'll try to compile it via qemu some day...

zaps166 commented 8 years ago

@DAP-DarkneSS New QMPlay2 uses CMake build system, Prostopleer can be disabled via CMake option.