Yet more sonarlint fixes
This commit is contained in:
@@ -63,7 +63,8 @@ SDL_mutex *blitmtx;
|
||||
SDL_threadID eventthread;
|
||||
static int exit_event = 0;
|
||||
static int fullscreen_pending = 0;
|
||||
uint32_t lang_id = 0x0409, lang_sys = 0x0409; // Multilangual UI variables, for now all set to LCID of en-US
|
||||
uint32_t lang_id = 0x0409; // Multilangual UI variables, for now all set to LCID of en-US
|
||||
uint32_t lang_sys = 0x0409; // Multilangual UI variables, for now all set to LCID of en-US
|
||||
char icon_set[256] = ""; /* name of the iconset to be used */
|
||||
|
||||
static const uint16_t sdl_to_xt[0x200] = {
|
||||
@@ -175,7 +176,10 @@ static const uint16_t sdl_to_xt[0x200] = {
|
||||
};
|
||||
|
||||
typedef struct sdl_blit_params {
|
||||
int x, y, w, h;
|
||||
int x;
|
||||
int y;
|
||||
int w;
|
||||
int h;
|
||||
} sdl_blit_params;
|
||||
|
||||
sdl_blit_params params = { 0, 0, 0, 0 };
|
||||
@@ -307,7 +311,7 @@ path_normalize(char *path)
|
||||
void
|
||||
path_slash(char *path)
|
||||
{
|
||||
if ((path[strlen(path) - 1] != '/')) {
|
||||
if (path[strlen(path) - 1] != '/') {
|
||||
strcat(path, "/");
|
||||
}
|
||||
path_normalize(path);
|
||||
@@ -347,7 +351,7 @@ path_get_filename(char *s)
|
||||
c--;
|
||||
}
|
||||
|
||||
return (s);
|
||||
return s;
|
||||
}
|
||||
|
||||
char *
|
||||
@@ -356,7 +360,7 @@ path_get_extension(char *s)
|
||||
int c = strlen(s) - 1;
|
||||
|
||||
if (c <= 0)
|
||||
return (s);
|
||||
return s;
|
||||
|
||||
while (c && s[c] != '.')
|
||||
c--;
|
||||
@@ -417,7 +421,8 @@ plat_timer_read(void)
|
||||
static uint64_t
|
||||
plat_get_ticks_common(void)
|
||||
{
|
||||
uint64_t EndingTime, ElapsedMicroseconds;
|
||||
uint64_t EndingTime;
|
||||
uint64_t ElapsedMicroseconds;
|
||||
if (first_use) {
|
||||
Frequency = SDL_GetPerformanceFrequency();
|
||||
StartingTime = SDL_GetPerformanceCounter();
|
||||
@@ -519,8 +524,10 @@ strnicmp(const char *s1, const char *s2, size_t n)
|
||||
void
|
||||
main_thread(void *param)
|
||||
{
|
||||
uint32_t old_time, new_time;
|
||||
int drawits, frames;
|
||||
uint32_t old_time;
|
||||
uint32_t new_time;
|
||||
int drawits;
|
||||
int frames;
|
||||
|
||||
SDL_SetThreadPriority(SDL_THREAD_PRIORITY_HIGH);
|
||||
framecountx = 0;
|
||||
@@ -693,7 +700,9 @@ ui_sb_bugui(char *str)
|
||||
extern void sdl_blit(int x, int y, int w, int h);
|
||||
|
||||
typedef struct mouseinputdata {
|
||||
int deltax, deltay, deltaz;
|
||||
int deltax;
|
||||
int deltay;
|
||||
int deltaz;
|
||||
int mousebuttons;
|
||||
} mouseinputdata;
|
||||
SDL_mutex *mousemutex;
|
||||
@@ -710,7 +719,8 @@ mouse_poll(void)
|
||||
SDL_UnlockMutex(mousemutex);
|
||||
}
|
||||
|
||||
int real_sdl_w, real_sdl_h;
|
||||
int real_sdl_w;
|
||||
int real_sdl_h;
|
||||
void
|
||||
ui_sb_set_ready(int ready)
|
||||
{
|
||||
@@ -721,7 +731,8 @@ char *xargv[512];
|
||||
char *
|
||||
local_strsep(char **str, const char *sep)
|
||||
{
|
||||
char *s = *str, *end;
|
||||
char *s = *str;
|
||||
char *end;
|
||||
if (!s)
|
||||
return NULL;
|
||||
end = s + strcspn(s, sep);
|
||||
@@ -828,8 +839,7 @@ process_media_commands_3(uint8_t *id, char *fn, uint8_t *wp, int cmdargc)
|
||||
bool err = false;
|
||||
*id = atoi(xargv[1]);
|
||||
if (xargv[2][0] == '\'' || xargv[2][0] == '"') {
|
||||
int curarg = 2;
|
||||
for (curarg = 2; curarg < cmdargc; curarg++) {
|
||||
for (int curarg = 2; curarg < cmdargc; curarg++) {
|
||||
if (strlen(fn) + strlen(xargv[curarg]) >= PATH_MAX) {
|
||||
err = true;
|
||||
fprintf(stderr, "Path name too long.\n");
|
||||
@@ -989,7 +999,8 @@ monitor_thread(void *param)
|
||||
} else if (strncasecmp(xargv[0], "zipeject", 8) == 0 && cmdargc >= 2) {
|
||||
zip_eject(atoi(xargv[1]));
|
||||
} else if (strncasecmp(xargv[0], "fddload", 7) == 0 && cmdargc >= 4) {
|
||||
uint8_t id, wp;
|
||||
uint8_t id;
|
||||
uint8_t wp;
|
||||
bool err = false;
|
||||
char fn[PATH_MAX];
|
||||
memset(fn, 0, sizeof(fn));
|
||||
@@ -1008,7 +1019,8 @@ monitor_thread(void *param)
|
||||
floppy_mount(id, fn, wp);
|
||||
}
|
||||
} else if (strncasecmp(xargv[0], "moload", 7) == 0 && cmdargc >= 4) {
|
||||
uint8_t id, wp;
|
||||
uint8_t id;
|
||||
uint8_t wp;
|
||||
bool err = false;
|
||||
char fn[PATH_MAX];
|
||||
memset(fn, 0, sizeof(fn));
|
||||
@@ -1027,7 +1039,8 @@ monitor_thread(void *param)
|
||||
mo_mount(id, fn, wp);
|
||||
}
|
||||
} else if (strncasecmp(xargv[0], "cartload", 7) == 0 && cmdargc >= 4) {
|
||||
uint8_t id, wp;
|
||||
uint8_t id;
|
||||
uint8_t wp;
|
||||
bool err = false;
|
||||
char fn[PATH_MAX];
|
||||
memset(fn, 0, sizeof(fn));
|
||||
@@ -1046,7 +1059,8 @@ monitor_thread(void *param)
|
||||
cartridge_mount(id, fn, wp);
|
||||
}
|
||||
} else if (strncasecmp(xargv[0], "zipload", 7) == 0 && cmdargc >= 4) {
|
||||
uint8_t id, wp;
|
||||
uint8_t id;
|
||||
uint8_t wp;
|
||||
bool err = false;
|
||||
char fn[PATH_MAX];
|
||||
memset(fn, 0, sizeof(fn));
|
||||
|
||||
Reference in New Issue
Block a user