mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-13 03:14:38 +00:00
Fix some more GCC warnings, mark some bugs based on GCC warnings (#2309)
* Fix some more GCC warnings, mark some bugs based on GCC warnings * Weird formatting * Suggested changes * More weird indentation I guess * UNREACHABLE() macro, add missing NORETURNs to fault_n64.c * AVOID_UB for PAL path in z_file_nameset.c * Remove comments about return types * Remove temp no longer needed
This commit is contained in:
parent
6199634ffb
commit
3f703a39d9
39 changed files with 156 additions and 83 deletions
|
@ -1,6 +1,8 @@
|
|||
#ifndef ATTRIBUTES_H
|
||||
#define ATTRIBUTES_H
|
||||
|
||||
#include "versions.h"
|
||||
|
||||
#if !defined(__GNUC__) && !defined(__attribute__)
|
||||
#define __attribute__(x)
|
||||
#endif
|
||||
|
@ -11,4 +13,17 @@
|
|||
#define NO_REORDER __attribute__((no_reorder))
|
||||
#define SECTION_DATA __attribute__((section(".data")))
|
||||
|
||||
#ifdef __GNUC__
|
||||
#define UNREACHABLE() __builtin_unreachable()
|
||||
#else
|
||||
#define UNREACHABLE()
|
||||
#endif
|
||||
|
||||
// Variables may be unused in retail versions but used in debug versions
|
||||
#if DEBUG_FEATURES
|
||||
#define UNUSED_NDEBUG
|
||||
#else
|
||||
#define UNUSED_NDEBUG UNUSED
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue