Skip to content

Commit

Permalink
Silence some warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
LibretroAdmin committed Jan 18, 2025
1 parent cf0ec85 commit 984d591
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion input/drivers/sdl_input.c
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ static void sdl_input_free(void *data)
#endif
sdl_input_t *sdl = (sdl_input_t*)data;

if (!data)
if (!sdl)
return;

/* Flush out all pending events. */
Expand Down
14 changes: 7 additions & 7 deletions input/input_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -5958,9 +5958,9 @@ bool bsv_movie_handle_read_input_event(bsv_movie_t *movie,
/* if movie is old, just read two bytes and hope for the best */
if (movie->version == 0)
{
int read = intfstream_read(movie->file, val, 2);
*val = swap_if_big16(*val);
return read == 2;
int64_t read = intfstream_read(movie->file, val, 2);
*val = swap_if_big16(*val);
return (read == 2);
}
for (i = 0; i < movie->input_event_count; i++)
{
Expand All @@ -5986,6 +5986,7 @@ void bsv_movie_finish_rewind(input_driver_state_t *input_st)
handle->first_rewind = !handle->did_rewind;
handle->did_rewind = false;
}

void bsv_movie_read_next_events(bsv_movie_t *handle)
{
input_driver_state_t *input_st = input_state_get_ptr();
Expand Down Expand Up @@ -6079,6 +6080,7 @@ void bsv_movie_read_next_events(bsv_movie_t *handle)
}
}
}

void bsv_movie_next_frame(input_driver_state_t *input_st)
{
settings_t *settings = config_get_ptr();
Expand Down Expand Up @@ -6144,9 +6146,7 @@ void bsv_movie_next_frame(input_driver_state_t *input_st)
}

if (input_st->bsv_movie_state.flags & BSV_FLAG_MOVIE_PLAYBACK)
{
bsv_movie_read_next_events(handle);
}
handle->frame_pos[handle->frame_counter & handle->frame_mask] = intfstream_tell(handle->file);
}

Expand All @@ -6165,8 +6165,8 @@ bool replay_get_serialized_data(void* buffer)

if (input_st->bsv_movie_state.flags & (BSV_FLAG_MOVIE_RECORDING | BSV_FLAG_MOVIE_PLAYBACK))
{
long file_end = intfstream_tell(handle->file);
long read_amt = 0;
int64_t file_end = intfstream_tell(handle->file);
int64_t read_amt = 0;
long file_end_lil = swap_if_big32(file_end);
uint8_t *file_end_bytes = (uint8_t *)(&file_end_lil);
uint8_t *buf = buffer;
Expand Down
3 changes: 2 additions & 1 deletion libretro-common/memmap/memmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,15 +135,16 @@ int mprotect(void *addr, size_t len, int prot)

int memsync(void *start, void *end)
{
size_t _len = (char*)end - (char*)start;
#if defined(__MACH__) && defined(__arm__)
size_t _len = (char*)end - (char*)start;
sys_dcache_flush(start, _len);
sys_icache_invalidate(start, _len);
return 0;
#elif defined(__arm__) && !defined(__QNX__)
__clear_cache(start, end);
return 0;
#elif defined(HAVE_MMAN)
size_t _len = (char*)end - (char*)start;
return msync(start, _len, MS_SYNC | MS_INVALIDATE
#ifdef __QNX__
MS_CACHE_ONLY
Expand Down

0 comments on commit 984d591

Please sign in to comment.