Merge pull request #7761 from orbea/c89

Fix gcc warnings with C89_BUILD.
This commit is contained in:
Twinaphex 2018-12-17 05:18:13 +01:00 committed by GitHub
commit af0bf7a992
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 5 deletions

View File

@ -218,14 +218,14 @@ static bool x11_display_server_set_resolution(void *data,
/* create interlaced newmode from modline variables */
if (height < 300)
{
snprintf(xrandr, sizeof(xrandr), "xrandr --newmode \"%dx%d_%0.2f\" %lf %d %d %d %d %d %d %d %d -hsync -vsync", width, height, hz, pixel_clock,
snprintf(xrandr, sizeof(xrandr), "xrandr --newmode \"%dx%d_%0.2f\" %f %d %d %d %d %d %d %d %d -hsync -vsync", width, height, hz, pixel_clock,
width, hfp, hsp, hbp, height, vfp, vsp, vbp);
system(xrandr);
}
/* create interlaced newmode from modline variables */
if (height > 300)
{
snprintf(xrandr, sizeof(xrandr), "xrandr --newmode \"%dx%d_%0.2f\" %lf %d %d %d %d %d %d %d %d interlace -hsync -vsync", width, height, hz, pixel_clock,
snprintf(xrandr, sizeof(xrandr), "xrandr --newmode \"%dx%d_%0.2f\" %f %d %d %d %d %d %d %d %d interlace -hsync -vsync", width, height, hz, pixel_clock,
width, hfp, hsp, hbp, height, vfp, vsp, vbp);
system(xrandr);
}

View File

@ -166,7 +166,7 @@ typedef struct
#endif
# endif
#else
# define PRI_SIZET "zu"
# define PRI_SIZET "lu"
#endif
#endif

View File

@ -392,7 +392,7 @@ void menu_display_timedate(menu_display_ctx_datetime_t *datetime)
case 7: /* Time (hours-minutes), in 12 hour AM-PM designation */
#if defined(__linux__) && !defined(ANDROID)
strftime(datetime->s, datetime->len,
"%r", localtime(&time_));
"%I : %M : %S %p", localtime(&time_));
#else
{
char *local;

View File

@ -731,7 +731,7 @@ static void netplay_announce_cb(void *task_data, void *user_data, const char *er
if (string_is_equal(key, "game_name"))
strlcpy(host_room->gamename, val, sizeof(host_room->gamename));
if (string_is_equal(key, "game_crc"))
sscanf(val, "%08X", &host_room->gamecrc);
sscanf(val, "%08d", &host_room->gamecrc);
if (string_is_equal(key, "host_method"))
sscanf(val, "%i", &host_room->host_method);
if (string_is_equal(key, "has_password"))