mirror of
https://github.com/syoyo/tinygltf.git
synced 2026-06-08 03:03:50 +00:00
When TG3JSON_USE_STDLIB_FPCONV is enabled (auto-selected on MSVC), the stdlib float-formatting block in tg3json__dtoa_c() always returns, making the manual long-double formatting fallback dead code. MSVC /W4 /WX turned the resulting C4702 (unreachable code) into a build error. Make the manual fallback an #else branch of the stdlib path so neither configuration contains unreachable code, and guard the fallback-only locals and helpers (tg3json__utoa, tg3json__write_exp, tg3json__format_decimal_digits) under !TG3JSON_USE_STDLIB_FPCONV to avoid unused-function/variable warnings on the stdlib path. Verified with gcc -Wall -Wextra -Werror across all v3 C test sources in both fpconv configurations, plus runtime runs of tester_v3_json_c. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
56 KiB
56 KiB