mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-12 09:25:42 +00:00
```
./src/thread/pthread/SDL_syssem.c:140:12: warning: variable 'retval' is used uninitialized whenever 'while' loop exits because its condition is false [-Wsometimes-uninitialized]
while (sem_trywait(&sem->sem) != 0) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~
./src/thread/pthread/SDL_syssem.c:149:12: note: uninitialized use occurs here
return retval;
^~~~~~
./src/thread/pthread/SDL_syssem.c:140:12: note: remove the condition if it is always true
while (sem_trywait(&sem->sem) != 0) {
```
This was a legitimate bug, thank you clang!
Fixes https://github.com/libsdl-org/SDL/issues/6830
(cherry picked from commit
|
||
|---|---|---|
| .. | ||
| SDL_syscond.c | ||
| SDL_sysmutex.c | ||
| SDL_sysmutex_c.h | ||
| SDL_syssem.c | ||
| SDL_systhread.c | ||
| SDL_systhread_c.h | ||
| SDL_systls.c | ||