Skip to content

Commit 5adaaf7

Browse files
Merge pull request #17717 from pstef/silence-warnings
Silence even more warnings
2 parents a58ac85 + a28b792 commit 5adaaf7

8 files changed

Lines changed: 15 additions & 16 deletions

File tree

ctr/ctr_linear.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -191,10 +191,13 @@ void* linearMemAlign(size_t len, size_t alignment)
191191
sLinearPool.Deallocate(chunk);
192192
return nullptr;
193193
}
194-
if (rbtree_insert(&sAddrMap, &node->node));
194+
if (!rbtree_insert(&sAddrMap, &node->node)) {
195+
sLinearPool.Deallocate(chunk);
196+
return nullptr;
197+
}
195198

196-
if (sLinearPool_maxaddr < (u32)sLinearPool.last->base)
197-
sLinearPool_maxaddr = (u32)sLinearPool.last->base;
199+
if (sLinearPool_maxaddr < (u32)sLinearPool.last->base)
200+
sLinearPool_maxaddr = (u32)sLinearPool.last->base;
198201

199202
return chunk.addr;
200203
}

ctr/exec-3dsx/exec_cia.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ static int isCiaInstalled(u64 titleId, u16 version)
6363
return 0;
6464
}
6565

66-
static int deleteCia(u64 TitleId)
66+
static void deleteCia(u64 TitleId)
6767
{
6868
u64 currTitleId = 0;
6969

dynamic.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ struct retro_core_t
6666
void *(*retro_get_memory_data)(unsigned);
6767
size_t (*retro_get_memory_size)(unsigned);
6868

69-
unsigned poll_type;
69+
enum poll_type poll_type;
7070
uint8_t flags;
7171
};
7272

libretro-common/audio/dsp_filters/tremolo.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ struct tremolo_core
3535
float *wavetable;
3636
float freq;
3737
float depth;
38-
int index;
39-
int maxindex;
38+
unsigned index;
39+
unsigned maxindex;
4040
};
4141

4242
struct tremolo

menu/cbs/menu_cbs_ok.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -707,10 +707,7 @@ int generic_action_ok_displaylist_push(
707707
recording_state_t *recording_st = recording_state_get_ptr();
708708

709709
if (!menu || string_is_equal(menu_ident, "null"))
710-
{
711-
menu_displaylist_info_free(&info);
712710
return -1;
713-
}
714711

715712
#ifdef HAVE_AUDIOMIXER
716713
if (audio_enable_menu && audio_enable_menu_ok)

retroarch_types.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
RETRO_BEGIN_DECLS
2222

23-
enum
23+
enum poll_type
2424
{
2525
/* Polling is performed before
2626
* call to retro_run. */

runloop.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4518,7 +4518,7 @@ static void core_input_state_poll_maybe(void)
45184518
runloop_state_t *runloop_st = &runloop_state;
45194519
const enum poll_type_override_t
45204520
core_poll_type_override = runloop_st->core_poll_type_override;
4521-
unsigned new_poll_type = (core_poll_type_override > POLL_TYPE_OVERRIDE_DONTCARE)
4521+
enum poll_type new_poll_type = (core_poll_type_override > POLL_TYPE_OVERRIDE_DONTCARE)
45224522
? (core_poll_type_override - 1)
45234523
: runloop_st->current_core.poll_type;
45244524
if (new_poll_type == POLL_TYPE_NORMAL)
@@ -4531,7 +4531,7 @@ static retro_input_state_t core_input_state_poll_return_cb(void)
45314531
runloop_state_t *runloop_st = &runloop_state;
45324532
const enum poll_type_override_t
45334533
core_poll_type_override = runloop_st->core_poll_type_override;
4534-
unsigned new_poll_type = (core_poll_type_override > POLL_TYPE_OVERRIDE_DONTCARE)
4534+
enum poll_type new_poll_type = (core_poll_type_override > POLL_TYPE_OVERRIDE_DONTCARE)
45354535
? (core_poll_type_override - 1)
45364536
: runloop_st->current_core.poll_type;
45374537
if (new_poll_type == POLL_TYPE_LATE)
@@ -7715,7 +7715,7 @@ void core_run(void)
77157715
current_core = &runloop_st->current_core;
77167716
const enum poll_type_override_t
77177717
core_poll_type_override = runloop_st->core_poll_type_override;
7718-
unsigned new_poll_type = (core_poll_type_override != POLL_TYPE_OVERRIDE_DONTCARE)
7718+
enum poll_type new_poll_type = (core_poll_type_override != POLL_TYPE_OVERRIDE_DONTCARE)
77197719
? (core_poll_type_override - 1)
77207720
: current_core->poll_type;
77217721
bool early_polling = new_poll_type == POLL_TYPE_EARLY;

tasks/task_database_cue.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -722,8 +722,7 @@ int detect_sat_game(intfstream_t *fd, char *s, size_t len, const char *filename)
722722
&& raw_game_id[1] == 'K'
723723
&& raw_game_id[2] == '-')
724724
{
725-
strncpy(s, &raw_game_id[3], __len - 3);
726-
s[__len - 3] = '\0';
725+
strlcpy(s, &raw_game_id[3], len);
727726
}
728727
else
729728
strlcpy(s, raw_game_id, len);

0 commit comments

Comments
 (0)