mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-23 23:41:24 +00:00
Fix a number of warnings when compiling with GCC (#1239)
* Silence a number of GCC warnings * Remove * Suggested changes * Format * Fix comment in en_go2
This commit is contained in:
parent
5015af4c57
commit
451b24f79b
71 changed files with 298 additions and 86 deletions
|
@ -1,6 +1,19 @@
|
|||
#ifndef MACROS_H
|
||||
#define MACROS_H
|
||||
|
||||
#ifndef __GNUC__
|
||||
#define __attribute__(x)
|
||||
#endif
|
||||
|
||||
#ifndef AVOID_UB
|
||||
#define BAD_RETURN(type) type
|
||||
#else
|
||||
#define BAD_RETURN(type) void
|
||||
#endif
|
||||
|
||||
#define UNUSED __attribute__((unused))
|
||||
#define FALLTHROUGH __attribute__((fallthrough))
|
||||
|
||||
#define ARRAY_COUNT(arr) (s32)(sizeof(arr) / sizeof(arr[0]))
|
||||
#define ARRAY_COUNTU(arr) (u32)(sizeof(arr) / sizeof(arr[0]))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue