mirror of
https://github.com/encounter/SDL.git
synced 2025-12-19 01:46:22 +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:
committed by
Anonymous Maarten
parent
d04fa0ef76
commit
274ec02581
@@ -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__)
|
||||
|
||||
Reference in New Issue
Block a user