SDL_stdinc.h: provide a prototype for strdup for __clang_analyzer__ case
Because strdup is not ANSI but POSIX, and its prototype might be hidden..
Reference issue: https://github.com/libsdl-org/SDL/issues/11219.
(cherry picked from commit 3ebfdb04be)
This commit is contained in:
1 parent
378234437f
commit
a976f7f71b
1 file changed
+3
@@ -749,6 +749,9 @@ size_t wcslcpy(wchar_t *dst, const wchar_t *src, size_t size);
|
|||||||
size_t wcslcat(wchar_t *dst, const wchar_t *src, size_t size);
|
size_t wcslcat(wchar_t *dst, const wchar_t *src, size_t size);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* strdup is not ANSI but POSIX, and its prototype might be hidden... */
|
||||||
|
char *strdup(const char *str);
|
||||||
|
|
||||||
/* Starting LLVM 16, the analyser errors out if these functions do not have
|
/* Starting LLVM 16, the analyser errors out if these functions do not have
|
||||||
their prototype defined (clang-diagnostic-implicit-function-declaration) */
|
their prototype defined (clang-diagnostic-implicit-function-declaration) */
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|||||||
Reference in new issue
Block a user