View Issue Details

IDProjectCategoryView StatusLast Update
0000015Kohi EngineBugspublic2026-10-24 03:08
Reportertravisvroman Assigned Totravisvroman  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Target Versionv0.13.0Fixed in Versionv0.13.0 
Summary0000015: [BUG] Werror breaks compilation because of stb_vorbis
Description

Ported over from GitHub issues: https://github.com/travisvroman/kohi/issues/278

I can't really build the project with the provided build scripts because of Werror, since stb_vorbis creates warnings.
I am assuming that the reason I have this issue and you don't is probably because I use clang version 21.1.6.
Maybe Werror should only be used for files belonging to the project itself.
(Not really a fan of Werror anyways, since it discourages compiler devs from adding potentially useful, but not always important, warnings)

The full output if you want it:

~/clones/kohi > clang --version
clang version 21.1.6
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
~/clones/kohi > ./build-all.sh linux build debug
Building everything on linux (debug)...
--- Performing kohi.tools.versiongen debug build ---
Linking kohi.tools.versiongen...
--- Performing kohi.core debug build ---
Linking kohi.core...
--- Performing kohi.tools debug build ---
kohi.tools/src/vendor/stb_vorbis.c...
kohi.tools/src/vendor/stb_vorbis.c:974:77: error: pointer comparison always evaluates to false [-Werror,-Wtautological-compare]
  974 |         if (f->stream_start + loc >= f->stream_end || f->stream_start + loc < f->stream_start) {
      |                                                                             ^
1 error generated.
make: *** [Makefile.executable.mak:151: obj/kohi.tools/src/vendor/stb_vorbis.c.o] Error 1
Error:2
Tagsbug, Fixed
Revision

Activities

travisvroman

2026-10-19 18:07

administrator   ~0000001

(Copied from GitHub)

Thanks for submitting this! I wound up editing the file slightly to handle this. Not ideal, but it was minor enough where everything else conforms anyway.

The fix for this is in 0.13 and will be merged into main when that version is released.

Issue History

Date Modified Username Field Change
2026-10-19 18:06 travisvroman New Issue
2026-10-19 18:06 travisvroman Status new => assigned
2026-10-19 18:06 travisvroman Assigned To => travisvroman
2026-10-19 18:06 travisvroman Tag Attached: bug
2026-10-19 18:06 travisvroman Tag Attached: Fixed
2026-10-19 18:07 travisvroman Note Added: 0000001
2026-10-19 18:26 travisvroman Fixed in Version => v0.13.0
2026-10-19 18:26 travisvroman Target Version => v0.13.0
2026-10-20 12:15 travisvroman Status assigned => resolved
2026-10-20 12:15 travisvroman Resolution open => fixed
2026-10-24 03:08 travisvroman Status resolved => closed