mirror of
https://github.com/raysan5/raylib.git
synced 2026-06-13 21:01:53 +08:00
The `qoaplay_open()` function expects a `char *`, but we are passing in a `const char *`. While this works just fine, it does issue a compiler warning when strict:
```
src/raudio.c: In function ‘LoadMusicStream’:
src/raudio.c:1290:45: warning: passing argument 1 of ‘qoaplay_open’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
1290 | qoaplay_desc *ctxQoa = qoaplay_open(fileName);
| ^~~~~~~~
In file included from src/raudio.c:233:
src/external/qoaplay.c:86:34: note: expected ‘char *’ but argument is of type ‘const char *’
86 | qoaplay_desc *qoaplay_open(char *path)
| ~~~~~~^~~~
```
This change casts the argument to a `char *` to fix the warning.
|
||
|---|---|---|
| .. | ||
| external | ||
| build.zig | ||
| CMakeLists.txt | ||
| config.h | ||
| Makefile | ||
| minshell.html | ||
| raudio.c | ||
| raylib.dll.rc | ||
| raylib.dll.rc.data | ||
| raylib.h | ||
| raylib.ico | ||
| raylib.rc | ||
| raylib.rc.data | ||
| raymath.h | ||
| rcamera.h | ||
| rcore.c | ||
| rgestures.h | ||
| rglfw.c | ||
| rlgl.h | ||
| rmodels.c | ||
| rshapes.c | ||
| rtext.c | ||
| rtextures.c | ||
| shell.html | ||
| utils.c | ||
| utils.h | ||