mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-06-01 01:17:40 +00:00
testautomation: avoid format related warnings by using a few pragma's
ci: enable -Werror to a few platforms
This commit is contained in:
parent
d04fa0ef76
commit
274ec02581
5 changed files with 177 additions and 2 deletions
|
@ -7,7 +7,6 @@
|
|||
#include "SDL.h"
|
||||
#include "SDL_test.h"
|
||||
|
||||
|
||||
/* Test case functions */
|
||||
|
||||
/**
|
||||
|
@ -36,6 +35,16 @@ stdlib_strlcpy(void *arg)
|
|||
return TEST_COMPLETED;
|
||||
}
|
||||
|
||||
#if defined(HAVE_WFORMAT) || defined(HAVE_WFORMAT_EXTRA_ARGS)
|
||||
#pragma GCC diagnostic push
|
||||
#if defined(HAVE_WFORMAT)
|
||||
#pragma GCC diagnostic ignored "-Wformat"
|
||||
#endif
|
||||
#if defined(HAVE_WFORMAT_EXTRA_ARGS)
|
||||
#pragma GCC diagnostic ignored "-Wformat-extra-args"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Call to SDL_snprintf
|
||||
*/
|
||||
|
@ -159,6 +168,10 @@ stdlib_snprintf(void *arg)
|
|||
return TEST_COMPLETED;
|
||||
}
|
||||
|
||||
#if defined(HAVE_WFORMAT) || defined(HAVE_WFORMAT_EXTRA_ARGS)
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Call to SDL_getenv and SDL_setenv
|
||||
*/
|
||||
|
@ -293,6 +306,16 @@ stdlib_getsetenv(void *arg)
|
|||
return TEST_COMPLETED;
|
||||
}
|
||||
|
||||
#if defined(HAVE_WFORMAT) || defined(HAVE_WFORMAT_EXTRA_ARGS)
|
||||
#pragma GCC diagnostic push
|
||||
#if defined(HAVE_WFORMAT)
|
||||
#pragma GCC diagnostic ignored "-Wformat"
|
||||
#endif
|
||||
#if defined(HAVE_WFORMAT_EXTRA_ARGS)
|
||||
#pragma GCC diagnostic ignored "-Wformat-extra-args"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Call to SDL_sscanf
|
||||
*/
|
||||
|
@ -375,6 +398,10 @@ stdlib_sscanf(void *arg)
|
|||
return TEST_COMPLETED;
|
||||
}
|
||||
|
||||
#if defined(HAVE_WFORMAT) || defined(HAVE_WFORMAT_EXTRA_ARGS)
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
#if defined(_WIN64)
|
||||
# define SIZE_FORMAT "I64u"
|
||||
#elif defined(__WIN32__)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue