libsdl-org / SDL_mixer

An audio mixer that supports various file formats for Simple Directmedia Layer.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

gcc -Wall -Werror, build error

medaminben opened this issue · comments

Hey folks

if (INT_MAX / sizeof(char*) < f->comment_list_length)

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

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

Fixed.