mirror of
https://github.com/Ryujinx/SDL.git
synced 2024-12-23 01:05:28 +00:00
silence -Wwrite-strings in visualtest
This commit is contained in:
parent
71c497a3a3
commit
8a355116d1
|
@ -137,7 +137,7 @@ int SDLVisualTest_InsertIntoActionQueue(SDLVisualTest_ActionQueue* queue,
|
||||||
*
|
*
|
||||||
* \return 1 on success, 0 on failure.
|
* \return 1 on success, 0 on failure.
|
||||||
*/
|
*/
|
||||||
int SDLVisualTest_ParseActionConfig(char* file, SDLVisualTest_ActionQueue* queue);
|
int SDLVisualTest_ParseActionConfig(const char* file, SDLVisualTest_ActionQueue* queue);
|
||||||
|
|
||||||
/* Ends C function definitions when using C++ */
|
/* Ends C function definitions when using C++ */
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
|
@ -259,7 +259,7 @@ SDLVisualTest_InsertIntoActionQueue(SDLVisualTest_ActionQueue* queue,
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
SDLVisualTest_ParseActionConfig(char* file, SDLVisualTest_ActionQueue* queue)
|
SDLVisualTest_ParseActionConfig(const char* file, SDLVisualTest_ActionQueue* queue)
|
||||||
{
|
{
|
||||||
char line[MAX_ACTION_LINE_LENGTH];
|
char line[MAX_ACTION_LINE_LENGTH];
|
||||||
SDLVisualTest_RWHelperBuffer buffer;
|
SDLVisualTest_RWHelperBuffer buffer;
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
|
|
||||||
/* String compare s1 and s2 ignoring leading hyphens */
|
/* String compare s1 and s2 ignoring leading hyphens */
|
||||||
static int
|
static int
|
||||||
StrCaseCmpIgnoreHyphen(char* s1, char* s2)
|
StrCaseCmpIgnoreHyphen(const char* s1, const char* s2)
|
||||||
{
|
{
|
||||||
/* treat NULL pointer as empty strings */
|
/* treat NULL pointer as empty strings */
|
||||||
if(!s1)
|
if(!s1)
|
||||||
|
@ -199,7 +199,7 @@ ParseArg(char** argv, int index, SDLVisualTest_HarnessState* state)
|
||||||
|
|
||||||
/* TODO: Trailing/leading spaces and spaces between equals sign not supported. */
|
/* TODO: Trailing/leading spaces and spaces between equals sign not supported. */
|
||||||
static int
|
static int
|
||||||
ParseConfig(char* file, SDLVisualTest_HarnessState* state)
|
ParseConfig(const char* file, SDLVisualTest_HarnessState* state)
|
||||||
{
|
{
|
||||||
SDL_RWops* rw;
|
SDL_RWops* rw;
|
||||||
SDLVisualTest_RWHelperBuffer buffer;
|
SDLVisualTest_RWHelperBuffer buffer;
|
||||||
|
|
|
@ -20,9 +20,9 @@
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
static void
|
static void
|
||||||
LogLastError(char* str)
|
LogLastError(const char* str)
|
||||||
{
|
{
|
||||||
char* error = (char*)strerror(errno);
|
const char* error = strerror(errno);
|
||||||
if(!str || !error)
|
if(!str || !error)
|
||||||
return;
|
return;
|
||||||
SDLTest_LogError("%s: %s", str, error);
|
SDLTest_LogError("%s: %s", str, error);
|
||||||
|
|
|
@ -49,8 +49,8 @@ static SDLVisualTest_ActionNode* current; /* the current action being performed
|
||||||
static SDL_TimerID action_timer, kill_timer;
|
static SDL_TimerID action_timer, kill_timer;
|
||||||
|
|
||||||
/* returns a char* to be passed as the format argument of a printf-style function. */
|
/* returns a char* to be passed as the format argument of a printf-style function. */
|
||||||
static char*
|
static const char*
|
||||||
usage()
|
usage(void)
|
||||||
{
|
{
|
||||||
return "Usage: \n%s --sutapp xyz"
|
return "Usage: \n%s --sutapp xyz"
|
||||||
" [--sutargs abc | --parameter-config xyz.parameters"
|
" [--sutargs abc | --parameter-config xyz.parameters"
|
||||||
|
@ -462,7 +462,7 @@ main(int argc, char* argv[])
|
||||||
|
|
||||||
if(state.sut_config.num_options > 0)
|
if(state.sut_config.num_options > 0)
|
||||||
{
|
{
|
||||||
char* variator_name = state.variator_type == SDL_VARIATOR_RANDOM ?
|
const char* variator_name = (state.variator_type == SDL_VARIATOR_RANDOM) ?
|
||||||
"RANDOM" : "EXHAUSTIVE";
|
"RANDOM" : "EXHAUSTIVE";
|
||||||
if(state.num_variations > 0)
|
if(state.num_variations > 0)
|
||||||
SDLTest_Log("Testing SUT with variator: %s for %d variations",
|
SDLTest_Log("Testing SUT with variator: %s for %d variations",
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
#if defined(__WIN32__)
|
#if defined(__WIN32__)
|
||||||
|
|
||||||
void
|
void
|
||||||
LogLastError(char* str)
|
LogLastError(const char* str)
|
||||||
{
|
{
|
||||||
LPVOID buffer;
|
LPVOID buffer;
|
||||||
DWORD dw = GetLastError();
|
DWORD dw = GetLastError();
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
#if defined(__WIN32__)
|
#if defined(__WIN32__)
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
||||||
void LogLastError(char* str);
|
void LogLastError(const char* str);
|
||||||
|
|
||||||
static int img_num;
|
static int img_num;
|
||||||
static SDL_ProcessInfo screenshot_pinfo;
|
static SDL_ProcessInfo screenshot_pinfo;
|
||||||
|
|
Loading…
Reference in a new issue