mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-07 03:48:14 +00:00
don't prototype strdup() for __clang_analyzer__ case in windows builds.
Fixes: https://github.com/libsdl-org/SDL/issues/12948.
(cherry picked from commit 17bba029ba
)
This commit is contained in:

committed by
Sam Lantinga

parent
7dd2915475
commit
5ac37a8ffc
@@ -5974,8 +5974,12 @@ 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
|
||||||
|
|
||||||
|
#ifndef _WIN32
|
||||||
/* strdup is not ANSI but POSIX, and its prototype might be hidden... */
|
/* strdup is not ANSI but POSIX, and its prototype might be hidden... */
|
||||||
|
/* not for windows: might conflict with string.h where strdup may have
|
||||||
|
* dllimport attribute: https://github.com/libsdl-org/SDL/issues/12948 */
|
||||||
char *strdup(const char *str);
|
char *strdup(const char *str);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* 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) */
|
||||||
|
Reference in New Issue
Block a user