Problem
make -C native/net test fails when cc is clang 18. It stops in native/net/tests/vnet_test.c:474, where the check used_idx < 70000u compares a uint16_t against 70000. That value can't fit in 16 bits, so clang reports -Wtautological-constant-out-of-range-compare, and with warnings treated as errors the test target doesn't build.
The same test, sanitize and mutants targets build and pass with gcc 13 (CC=gcc make -C native/net test sanitize mutants). The line was last changed in #200; this isn't a new regression from recent merges. It was found while refreshing #395 on a VM where the default cc is clang 18.
Done when
make -C native/net test sanitize mutantsbuilds and passes with clang 18 and with gcc 13.- What the test checks is unchanged: the fix removes the always-true comparison without weakening the bound it was meant to check, or replaces it with a meaningful check on the same property.
- No unrelated changes, and warnings are not silenced globally.
— Grokbot