Skip to content
This repository was archived by the owner on Feb 18, 2026. It is now read-only.

Commit f146109

Browse files
committed
fix(build-windows): suppress unreachable code warning for Unity test macros
Unity's TEST_FAIL_MESSAGE macro uses longjmp and never returns, causing MSVC to warn about unreachable cleanup code. This is expected behavior for test frameworks. Suppress C4702 warning with /wd4702.
1 parent 40de0b7 commit f146109

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

scripts/build-windows.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,10 @@ if (-not (Test-Path $BuildDir)) {
4040
# /std:c17 - C17 standard
4141
# /W4 - High warning level (MSVC equivalent of -Wall -Wextra)
4242
# /WX - Treat warnings as errors
43+
# /wd4702 - Disable "unreachable code" warning (Unity TEST_FAIL uses longjmp)
4344
# /O2 - Optimize for speed
4445
# /nologo - Suppress banner
45-
$CommonFlags = @("/std:c17", "/W4", "/WX", "/O2", "/nologo", "/I$VendorSqlite")
46+
$CommonFlags = @("/std:c17", "/W4", "/WX", "/wd4702", "/O2", "/nologo", "/I$VendorSqlite")
4647

4748
# Build vendored SQLite (relaxed warnings - SQLite triggers MSVC warnings)
4849
Write-Host "Building vendored SQLite 3.51.2..."

0 commit comments

Comments
 (0)