Skip to content

narrowing conversion when char is not signed #191

@Zirias

Description

@Zirias

Building fails on architectures with unsigned char like powerpc:

../../emu64-5.0.18/src/c64_class.cpp: In member function 'void 
C64Class::AnalyzeSDLEvent(SDL_Event*)':
../../emu64-5.0.18/src/c64_class.cpp:1760:46: error: narrowing conversion of '-1' from 'int' to 'char' [-Wnarrowing]
 1760 |     static char joy_axis_tbl[5] = {1,1,0,0,-1};
      |                                              ^
*** [c64_class.o] Error code 1

Suggestion: explicitly use unsigned char and signed char where appropriate.

Reported from: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=245200

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions