| Summary: | compiler warnings SDL_stdinc.h (g++) [patch attached] | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Martin Gerhardy <martin.gerhardy> |
| Component: | *don't know* | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | philipp.wiesemann |
| Version: | HG 2.0 | ||
| Hardware: | All | ||
| OS: | All | ||
| Attachments: |
fixed the warnings
this time the fixed patch |
||
|
Description
Martin Gerhardy
2013-04-03 13:57:08 UTC
Created attachment 1096 [details]
fixed the warnings
(In reply to comment #1) > Created attachment 1096 [details] > fixed the warnings The patch has a spelling mistake: "__cpluscplus" needs to be "__cplusplus". Is there a value to using const_cast instead of just casting it to (char*) ? --ryan. whenever one includes SDL.h with c++ you get the following warnings:
In file included from /usr/include/SDL2/SDL_main.h:25:0,
from /usr/include/SDL2/SDL.h:65,
from src/common/File.h:8,
from src/common/File.cpp:1:
/usr/include/SDL2/SDL_stdinc.h: In function 'char* SDL_strchr_inline(const char*, int)':
/usr/include/SDL2/SDL_stdinc.h:506:95: warning: cast from type 'const char*' to type 'char*' casts away qualifiers [-Wcast-qual]
/usr/include/SDL2/SDL_stdinc.h: In function 'char* SDL_strrchr_inline(const char*, int)':
/usr/include/SDL2/SDL_stdinc.h:515:97: warning: cast from type 'const char*' to type 'char*' casts away qualifiers [-Wcast-qual]
/usr/include/SDL2/SDL_stdinc.h: In function 'char* SDL_strstr_inline(const char*, const char*)':
/usr/include/SDL2/SDL_stdinc.h:524:123: warning: cast from type 'const char*' to type 'char*' casts away qualifiers [-Wcast-qual]
There is another warning about the qsort stuff - it should not have a return value. It's also included in the patch
And sorry for the typo.
Created attachment 1097 [details]
this time the fixed patch
This is now hg changeset c1563f514b5b, thanks! --ryan. |