Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix "unreachable code" warning #1291

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions cpu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -846,19 +846,24 @@ inline bool CPU_QueryARMv7()
#if defined(__ANDROID__) && defined(__arm__)
if (((android_getCpuFamily() & ANDROID_CPU_FAMILY_ARM) != 0) &&
((android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_ARMv7) != 0))
# define LOCALRET true
return true;
#elif defined(__linux__) && defined(__arm__)
if ((getauxval(AT_HWCAP) & HWCAP_ARMv7) != 0 ||
(getauxval(AT_HWCAP) & HWCAP_NEON) != 0)
return true;
# define LOCALRET true
#elif defined(__APPLE__) && defined(__arm__)
// Apple hardware is ARMv7 or above.
return true;
# define LOCALRET true
#elif defined(_WIN32) && defined(_M_ARM64)
// Windows 10 ARM64 is only supported on Armv8a and above
return true;
# define LOCALRET true
#endif
return false;
#ifndef LOCALRET
# define LOCALRET false
#endif
return LOCALRET;
#undef LOCALRET
}

inline bool CPU_QueryNEON()
Expand Down
Loading