Describe the bug
Building VRM4U on Mac with UE 5.8 fails in VRM4ULoader because Clang treats unreachable-code warnings as errors.
The build command was:
"$UE_ROOT/Engine/Build/BatchFiles/Mac/Build.sh" \
"${PROJECT_NAME}Editor" \
Mac \
Development \
-Project="$PROJECT" \
-WaitMutex \
-NoHotReloadFromIDE \
-Verbose
Errors are:
VrmConvertModel.cpp:2292:8: error: code will never be executed [-Werror,-Wunreachable-code]
VrmConvertModel.cpp:2159:7: error: code will never be executed [-Werror,-Wunreachable-code]
VrmConvertPose.cpp:1092:31: error: loop will run at most once (loop increment never executed) [-Werror,-Wunreachable-code-loop-increment]
VrmConvertModel_Description.cpp:2269:8: error: code will never be executed [-Werror,-Wunreachable-code]
VrmConvertModel_Description.cpp:2136:7: error: code will never be executed [-Werror,-Wunreachable-code]
The workaround is simple. Adding Clang diagnostic suppression for these warnings in those files allows the plugin to build:
#if defined(__clang__)
#pragma clang diagnostic ignored "-Wunreachable-code"
#pragma clang diagnostic ignored "-Wunreachable-code-loop-increment"
#endif
UnrealEngine Version:
- Unreal Engine: 5.8
- Platform: macOS
- Architecture: arm64
- Compiler: Apple Clang 21.x / Xcode
- Project type: C++/project build
- Plugin: VRM4U latest UE5.8-compatible release (20260622)
Describe the bug
Building VRM4U on Mac with UE 5.8 fails in
VRM4ULoaderbecause Clang treats unreachable-code warnings as errors.The build command was:
Errors are:
The workaround is simple. Adding Clang diagnostic suppression for these warnings in those files allows the plugin to build:
UnrealEngine Version: