libsdl-org / SDL_mixer

An audio mixer that supports various file formats for Simple Directmedia Layer.
zlib License
430 stars 147 forks source link

gcc -Wall -Werror, build error #614

Closed medaminben closed 6 months ago

medaminben commented 6 months ago

Hey folks https://github.com/libsdl-org/SDL_mixer/blob/4ed68d19e98d7eecdd10eb15166ffa2d8a0991ef/src/codecs/stb_vorbis/stb_vorbis.h#L3769-L3769 building with gcc 13.1 flagged as -Wall -Werror throws:

comparison of integer expressions of different signedness: 'long long unsigned int' and 'int' [-Werror=sign-compare]

a cast takes it out: if ((int)(INT_MAX / sizeof(char*)) < f->comment_list_length) can someone fix it please

sezero commented 6 months ago

I don't have gcc13 available, but my gcc14 warns only when using -W or -Wextra. Pushing a fix shortly.

sezero commented 6 months ago

Fixed.