all repos — mgba @ aab6231b681b25db70035d45aec6e7403d5d5e62

mGBA Game Boy Advance Emulator

Core: Fix warning in DISABLE_THREADING build
Vicki Pfau vi@endrift.com
Wed, 24 Jun 2020 02:14:29 -0700
commit

aab6231b681b25db70035d45aec6e7403d5d5e62

parent

e72378eb63f933163dde16cd8d9ce2c1a4accfca

1 files changed, 5 insertions(+), 8 deletions(-)

jump to
M src/core/thread.csrc/core/thread.c

@@ -636,12 +636,6 @@ return NULL;

} #endif -#else -struct mCoreThread* mCoreThreadGet(void) { - return NULL; -} -#endif - static void _mCoreLog(struct mLogger* logger, int category, enum mLogLevel level, const char* format, va_list args) { UNUSED(logger); UNUSED(level);

@@ -650,11 +644,14 @@ vprintf(format, args);

printf("\n"); struct mCoreThread* thread = mCoreThreadGet(); if (thread && level == mLOG_FATAL) { -#ifndef DISABLE_THREADING mCoreThreadMarkCrashed(thread); -#endif } } +#else +struct mCoreThread* mCoreThreadGet(void) { + return NULL; +} +#endif struct mLogger* mCoreThreadLogger(void) { struct mCoreThread* thread = mCoreThreadGet();