notaz / picodrive

Fast MegaDrive/MegaCD/32X emulator
Other
292 stars 167 forks source link

pico: Fix -Wtypedef-redefinition warnings #153

Closed orbea closed 2 months ago

orbea commented 1 year ago

@notaz Small change to improve portability when using -std=gnu99. These are already defined in memory.h so they can be removed in videoport.c which includes the former file. Also added the missing define to memory.h.

pico/videoport.c:18:24: warning: redefinition of typedef 'u8' is a C11 feature [-Wtypedef-redefinition] typedef unsigned char  u8;
                       ^
pico/memory.h:5:24: note: previous definition is here typedef unsigned char  u8;
                       ^
pico/videoport.c:19:24: warning: redefinition of typedef 'u16' is a C11 feature [-Wtypedef-redefinition] typedef unsigned short u16;
                       ^
pico/memory.h:6:24: note: previous definition is here typedef unsigned short u16;
                       ^
pico/videoport.c:20:24: warning: redefinition of typedef 'u32' is a C11 feature [-Wtypedef-redefinition]
typedef unsigned int   u32;
                       ^
pico/memory.h:7:24: note: previous definition is here
typedef unsigned int   u32;
                       ^
3 warnings generated.
orbea commented 1 year ago

@notaz Is there an issue with this? It should be trivial and straight forward.

notaz commented 2 months ago

Sorry for ignoring this. If this is still relevant, please send a PR to https://github.com/irixxxx/picodrive as that one is the active fork.