Skip to content

Commit 79e43e2

Browse files
authored
Fix many warnings (#16180)
Also change iOS/tvOS to use system zlib instead of compiling it in
1 parent 494f6a1 commit 79e43e2

15 files changed

Lines changed: 23 additions & 42 deletions

File tree

cheevos/cheevos.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,7 @@ static void rcheevos_server_error(const char* api_name, const char* message)
616616
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_ERROR);
617617
}
618618

619-
static void rcheevos_server_disconnected()
619+
static void rcheevos_server_disconnected(void)
620620
{
621621
CHEEVOS_LOG(RCHEEVOS_TAG "Unable to communicate with RetroAchievements server\n");
622622

@@ -633,7 +633,7 @@ static void rcheevos_server_disconnected()
633633
#endif
634634
}
635635

636-
static void rcheevos_server_reconnected()
636+
static void rcheevos_server_reconnected(void)
637637
{
638638
CHEEVOS_LOG(RCHEEVOS_TAG "All pending requests synced to RetroAchievements server\n");
639639

@@ -731,7 +731,7 @@ int rcheevos_get_richpresence(char* s, size_t len)
731731
}
732732
}
733733

734-
return rc_client_get_rich_presence_message(rcheevos_locals.client, s, (size_t)len);
734+
return (int)rc_client_get_rich_presence_message(rcheevos_locals.client, s, (size_t)len);
735735
}
736736

737737
#else /* !HAVE_RC_CLIENT */

deps/dr/dr_flac.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -772,7 +772,7 @@ typedef drflac_int32 drflac_result;
772772
static drflac_bool32 drflac__gIsLZCNTSupported = DRFLAC_FALSE;
773773
#ifndef DRFLAC_NO_CPUID
774774
static drflac_bool32 drflac__gIsSSE42Supported = DRFLAC_FALSE;
775-
static void drflac__init_cpu_caps()
775+
static void drflac__init_cpu_caps(void)
776776
{
777777
int info[4] = {0};
778778

deps/xdelta3/xdelta3.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1079,7 +1079,7 @@ static uint32_t adler32 (uint32_t adler, const uint8_t *buf, usize_t len)
10791079
{
10801080
uint32_t s1 = adler & 0xffffU;
10811081
uint32_t s2 = (adler >> 16) & 0xffffU;
1082-
int k;
1082+
usize_t k;
10831083

10841084
while (len > 0)
10851085
{

gfx/drivers/gl2.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3426,9 +3426,6 @@ static bool gl2_frame(void *data, const void *frame,
34263426
bool use_rgba = (video_info->video_st_flags & VIDEO_FLAG_USE_RGBA) ? true : false;
34273427
bool statistics_show = video_info->statistics_show;
34283428
bool msg_bgcolor_enable = video_info->msg_bgcolor_enable;
3429-
#ifndef EMSCRIPTEN
3430-
unsigned black_frame_insertion = video_info->black_frame_insertion;
3431-
#endif
34323429
int bfi_light_frames;
34333430
unsigned n;
34343431
bool input_driver_nonblock_state = video_info->input_driver_nonblock_state;
@@ -3442,10 +3439,6 @@ static bool gl2_frame(void *data, const void *frame,
34423439
#endif
34433440
#ifdef HAVE_GFX_WIDGETS
34443441
bool widgets_active = video_info->widgets_active;
3445-
#endif
3446-
#ifndef EMSCRIPTEN
3447-
bool runloop_is_slowmotion = video_info->runloop_is_slowmotion;
3448-
bool runloop_is_paused = video_info->runloop_is_paused;
34493442
#endif
34503443
bool overlay_behind_menu = video_info->overlay_behind_menu;
34513444

gfx/drivers/gl3.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2503,12 +2503,9 @@ static bool gl3_frame(void *data, const void *frame,
25032503
#if 0
25042504
bool msg_bgcolor_enable = video_info->msg_bgcolor_enable;
25052505
#endif
2506-
unsigned black_frame_insertion = video_info->black_frame_insertion;
25072506
int bfi_light_frames;
25082507
unsigned n;
25092508
unsigned hard_sync_frames = video_info->hard_sync_frames;
2510-
bool runloop_is_paused = video_info->runloop_is_paused;
2511-
bool runloop_is_slowmotion = video_info->runloop_is_slowmotion;
25122509
bool input_driver_nonblock_state = video_info->input_driver_nonblock_state;
25132510
#ifdef HAVE_MENU
25142511
bool menu_is_alive = (video_info->menu_st_flags & MENU_ST_FLAG_ALIVE) ? true : false;

gfx/gfx_thumbnail_path.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,6 @@ bool gfx_thumbnail_set_content_playlist(
403403
const char *core_name = NULL;
404404
const char *db_name = NULL;
405405
const struct playlist_entry *entry = NULL;
406-
settings_t* settings = config_get_ptr();
407406

408407
if (!path_data)
409408
return false;

gfx/gfx_widgets.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1600,7 +1600,7 @@ void gfx_widgets_frame(void *data)
16001600
/* AI Service overlay */
16011601
if (p_dispwidget->ai_service_overlay_state > 0)
16021602
{
1603-
int text_length = strlen(p_dispwidget->ai_service_text);
1603+
size_t text_length = strlen(p_dispwidget->ai_service_text);
16041604

16051605
gfx_display_set_alpha(p_dispwidget->pure_white, 1.0f);
16061606

@@ -1638,7 +1638,7 @@ void gfx_widgets_frame(void *data)
16381638

16391639
if (text_width > (video_width * 0.9f - padding * 2))
16401640
{
1641-
int text_half = text_length / 2;
1641+
size_t text_half = text_length / 2;
16421642
char *extra_line = (char*)malloc(sizeof(char) * text_length);
16431643
for (; text_half > 0; text_half--)
16441644
{

gfx/video_driver.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4302,8 +4302,8 @@ void video_frame_rest(video_driver_state_t *video_st,
43024302
retro_time_t frame_time_target = 1000000.0f / settings->floats.video_refresh_rate;
43034303
retro_time_t frame_time = 0;
43044304
static retro_time_t after_present = 0;
4305-
int sleep_max = frame_time_target / 1000 / 2;
4306-
int sleep = 0;
4305+
retro_time_t sleep_max = frame_time_target / 1000 / 2;
4306+
retro_time_t sleep = 0;
43074307
int frame_time_near_req_count = ceil(settings->floats.video_refresh_rate / 2);
43084308
static int frame_time_over_count = 0;
43094309
static int frame_time_near_count = 0;

libretro-common/include/libretro.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3129,7 +3129,7 @@ typedef void (RETRO_CALLCONV *retro_netpacket_send_t)(int flags, const void* buf
31293129
* This function is not guaranteed to be thread-safe and must be called during
31303130
* retro_run or any of the netpacket callbacks passed with this interface.
31313131
*/
3132-
typedef void (RETRO_CALLCONV *retro_netpacket_poll_receive_t)();
3132+
typedef void (RETRO_CALLCONV *retro_netpacket_poll_receive_t)(void);
31333133

31343134
/* Called by the frontend to signify that a multiplayer session has started.
31353135
* If client_id is 0 the local player is the host of the session and at this

menu/drivers/ozone.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8310,7 +8310,7 @@ static enum menu_action ozone_parse_menu_entry_action(
83108310
{
83118311
ozone->pending_cursor_in_sidebar = false;
83128312
ozone->flags |= OZONE_FLAG_CURSOR_IN_SIDEBAR;
8313-
ozone_sidebar_goto(ozone, ozone->categories_selection_ptr);
8313+
ozone_sidebar_goto(ozone, (unsigned)ozone->categories_selection_ptr);
83148314
}
83158315
break;
83168316

0 commit comments

Comments
 (0)