1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-03 06:24:30 +00:00

Apply noreturn attribute where applicable (#1532)

This commit is contained in:
Tharo 2023-09-09 15:24:52 +01:00 committed by GitHub
parent bedf07d541
commit 7235af2249
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 30 additions and 18 deletions

View file

@ -1,19 +1,12 @@
#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]))