Fixed bug 1646 - Warnings from clang with -Weverything

This commit is contained in:
Sam Lantinga
2016-11-15 01:30:08 -08:00
parent 0d24495b15
commit 818d1d3e80
7 changed files with 30 additions and 7 deletions

View File

@@ -443,7 +443,7 @@ SDLTest_RandomSint64BoundaryValue(Sint64 boundary1, Sint64 boundary2, SDL_bool v
float
SDLTest_RandomUnitFloat()
{
return (float) SDLTest_RandomUint32() / UINT_MAX;
return SDLTest_RandomUint32() / (float) UINT_MAX;
}
float

View File

@@ -206,7 +206,7 @@ SDLTest_SetTestTimeout(int timeout, void (*callback)())
/**
* \brief Timeout handler. Aborts test run and exits harness process.
*/
static void
static SDL_NORETURN void
SDLTest_BailOut()
{
SDLTest_LogError("TestCaseTimeout timer expired. Aborting test run.");

View File

@@ -26,7 +26,9 @@
*/
/* quiet windows compiler warnings */
#define _CRT_SECURE_NO_WARNINGS
#if defined(_MSC_VER)
# define _CRT_SECURE_NO_WARNINGS
#endif
#include "SDL_config.h"