Merge pull request #17717 from pstef/silence-warnings

Silence even more warnings
This commit is contained in:
LibretroAdmin 2025-03-21 08:41:40 -07:00 committed by GitHub
commit 5adaaf7851
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 15 additions and 16 deletions

View File

@ -191,10 +191,13 @@ void* linearMemAlign(size_t len, size_t alignment)
sLinearPool.Deallocate(chunk);
return nullptr;
}
if (rbtree_insert(&sAddrMap, &node->node));
if (!rbtree_insert(&sAddrMap, &node->node)) {
sLinearPool.Deallocate(chunk);
return nullptr;
}
if (sLinearPool_maxaddr < (u32)sLinearPool.last->base)
sLinearPool_maxaddr = (u32)sLinearPool.last->base;
if (sLinearPool_maxaddr < (u32)sLinearPool.last->base)
sLinearPool_maxaddr = (u32)sLinearPool.last->base;
return chunk.addr;
}

View File

@ -63,7 +63,7 @@ static int isCiaInstalled(u64 titleId, u16 version)
return 0;
}
static int deleteCia(u64 TitleId)
static void deleteCia(u64 TitleId)
{
u64 currTitleId = 0;

View File

@ -66,7 +66,7 @@ struct retro_core_t
void *(*retro_get_memory_data)(unsigned);
size_t (*retro_get_memory_size)(unsigned);
unsigned poll_type;
enum poll_type poll_type;
uint8_t flags;
};

View File

@ -35,8 +35,8 @@ struct tremolo_core
float *wavetable;
float freq;
float depth;
int index;
int maxindex;
unsigned index;
unsigned maxindex;
};
struct tremolo

View File

@ -707,10 +707,7 @@ int generic_action_ok_displaylist_push(
recording_state_t *recording_st = recording_state_get_ptr();
if (!menu || string_is_equal(menu_ident, "null"))
{
menu_displaylist_info_free(&info);
return -1;
}
#ifdef HAVE_AUDIOMIXER
if (audio_enable_menu && audio_enable_menu_ok)

View File

@ -20,7 +20,7 @@
RETRO_BEGIN_DECLS
enum
enum poll_type
{
/* Polling is performed before
* call to retro_run. */

View File

@ -4518,7 +4518,7 @@ static void core_input_state_poll_maybe(void)
runloop_state_t *runloop_st = &runloop_state;
const enum poll_type_override_t
core_poll_type_override = runloop_st->core_poll_type_override;
unsigned new_poll_type = (core_poll_type_override > POLL_TYPE_OVERRIDE_DONTCARE)
enum poll_type new_poll_type = (core_poll_type_override > POLL_TYPE_OVERRIDE_DONTCARE)
? (core_poll_type_override - 1)
: runloop_st->current_core.poll_type;
if (new_poll_type == POLL_TYPE_NORMAL)
@ -4531,7 +4531,7 @@ static retro_input_state_t core_input_state_poll_return_cb(void)
runloop_state_t *runloop_st = &runloop_state;
const enum poll_type_override_t
core_poll_type_override = runloop_st->core_poll_type_override;
unsigned new_poll_type = (core_poll_type_override > POLL_TYPE_OVERRIDE_DONTCARE)
enum poll_type new_poll_type = (core_poll_type_override > POLL_TYPE_OVERRIDE_DONTCARE)
? (core_poll_type_override - 1)
: runloop_st->current_core.poll_type;
if (new_poll_type == POLL_TYPE_LATE)
@ -7715,7 +7715,7 @@ void core_run(void)
current_core = &runloop_st->current_core;
const enum poll_type_override_t
core_poll_type_override = runloop_st->core_poll_type_override;
unsigned new_poll_type = (core_poll_type_override != POLL_TYPE_OVERRIDE_DONTCARE)
enum poll_type new_poll_type = (core_poll_type_override != POLL_TYPE_OVERRIDE_DONTCARE)
? (core_poll_type_override - 1)
: current_core->poll_type;
bool early_polling = new_poll_type == POLL_TYPE_EARLY;

View File

@ -722,8 +722,7 @@ int detect_sat_game(intfstream_t *fd, char *s, size_t len, const char *filename)
&& raw_game_id[1] == 'K'
&& raw_game_id[2] == '-')
{
strncpy(s, &raw_game_id[3], __len - 3);
s[__len - 3] = '\0';
strlcpy(s, &raw_game_id[3], len);
}
else
strlcpy(s, raw_game_id, len);