mirror of
https://github.com/libretro/RetroArch
synced 2025-01-29 18:32:44 +00:00
Merge pull request #943 from lioncash/printf-fmt
Fix some printf specifiers to the correct signed-ness
This commit is contained in:
commit
6fdc22eb0b
@ -123,7 +123,7 @@ static void *alsa_qsa_init(const char *device, unsigned rate, unsigned latency)
|
||||
else
|
||||
alsa->buf_size = next_pow2(32 * latency);
|
||||
|
||||
RARCH_LOG("[ALSA QSA]: buffer size: %d bytes\n", alsa->buf_size);
|
||||
RARCH_LOG("[ALSA QSA]: buffer size: %u bytes\n", alsa->buf_size);
|
||||
|
||||
alsa->buf_count = (latency * 4 * rate + 500) / 1000;
|
||||
alsa->buf_count = (alsa->buf_count + alsa->buf_size / 2) / alsa->buf_size;
|
||||
|
@ -116,7 +116,7 @@ static void *sl_init(const char *device, unsigned rate, unsigned latency)
|
||||
if (!sl)
|
||||
goto error;
|
||||
|
||||
RARCH_LOG("[SLES]: Requested audio latency: %d ms.", latency);
|
||||
RARCH_LOG("[SLES]: Requested audio latency: %u ms.", latency);
|
||||
|
||||
GOTO_IF_FAIL(slCreateEngine(&sl->engine_object, 0, NULL, 0, NULL, NULL));
|
||||
GOTO_IF_FAIL(SLObjectItf_Realize(sl->engine_object, SL_BOOLEAN_FALSE));
|
||||
|
@ -96,7 +96,7 @@ static void *sdl_audio_init(const char *device, unsigned rate, unsigned latency)
|
||||
sdl->lock = slock_new();
|
||||
sdl->cond = scond_new();
|
||||
|
||||
RARCH_LOG("SDL audio: Requested %d ms latency, got %d ms\n", latency, (int)(out.samples * 4 * 1000 / g_settings.audio.out_rate));
|
||||
RARCH_LOG("SDL audio: Requested %u ms latency, got %d ms\n", latency, (int)(out.samples * 4 * 1000 / g_settings.audio.out_rate));
|
||||
|
||||
// Create a buffer twice as big as needed and prefill the buffer.
|
||||
size_t bufsize = out.samples * 4 * sizeof(int16_t);
|
||||
|
@ -37,7 +37,7 @@ static void *xa_init(const char *device, unsigned rate, unsigned latency)
|
||||
|
||||
size_t bufsize = latency * rate / 1000;
|
||||
|
||||
RARCH_LOG("XAudio2: Requesting %d ms latency, using %d ms latency.\n",
|
||||
RARCH_LOG("XAudio2: Requesting %u ms latency, using %d ms latency.\n",
|
||||
latency, (int)bufsize * 1000 / rate);
|
||||
|
||||
xa->bufsize = bufsize * 2 * sizeof(float);
|
||||
|
@ -619,7 +619,7 @@ bool rarch_environment_cb(unsigned cmd, void *data)
|
||||
|
||||
case RETRO_ENVIRONMENT_GET_LANGUAGE:
|
||||
*(unsigned *)data = g_settings.user_language;
|
||||
RARCH_LOG("Environ GET_LANGUAGE: \"%d\".\n",
|
||||
RARCH_LOG("Environ GET_LANGUAGE: \"%u\".\n",
|
||||
g_settings.user_language);
|
||||
break;
|
||||
|
||||
|
@ -2165,7 +2165,7 @@ static void menu_common_setting_set_label(char *type_str,
|
||||
unsigned height = gfx_ctx_get_resolution_height(
|
||||
g_extern.console.screen.resolutions.list
|
||||
[g_extern.console.screen.resolutions.current.idx]);
|
||||
snprintf(type_str, type_str_size, "%dx%d", width, height);
|
||||
snprintf(type_str, type_str_size, "%ux%u", width, height);
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
@ -2175,7 +2175,7 @@ static void menu_common_setting_set_label(char *type_str,
|
||||
strlcpy(type_str, "...", type_str_size);
|
||||
break;
|
||||
case MENU_SETTINGS_BIND_PLAYER:
|
||||
snprintf(type_str, type_str_size, "#%d",
|
||||
snprintf(type_str, type_str_size, "#%u",
|
||||
driver.menu->current_pad + 1);
|
||||
break;
|
||||
case MENU_SETTINGS_BIND_DEVICE:
|
||||
@ -2191,7 +2191,7 @@ static void menu_common_setting_set_label(char *type_str,
|
||||
strlcpy(type_str, device_name, type_str_size);
|
||||
else
|
||||
snprintf(type_str, type_str_size,
|
||||
"N/A (port #%u)", map);
|
||||
"N/A (port #%d)", map);
|
||||
}
|
||||
else
|
||||
strlcpy(type_str, "Disabled", type_str_size);
|
||||
|
@ -42,7 +42,7 @@ static bool g_es3;
|
||||
static void gfx_ctx_set_swap_interval(void *data, unsigned interval)
|
||||
{
|
||||
(void)data;
|
||||
RARCH_LOG("gfx_ctx_set_swap_interval(%d).\n", interval);
|
||||
RARCH_LOG("gfx_ctx_set_swap_interval(%u).\n", interval);
|
||||
eglSwapInterval(g_egl_dpy, interval);
|
||||
}
|
||||
|
||||
|
@ -251,7 +251,7 @@ static bool d3d_init_multipass(d3d_video_t *d3d)
|
||||
|
||||
gfx_shader_resolve_relative(&d3d->shader, d3d->cg_shader.c_str());
|
||||
|
||||
RARCH_LOG("[D3D9 Meta-Cg] Found %d shaders.\n", d3d->shader.passes);
|
||||
RARCH_LOG("[D3D9 Meta-Cg] Found %u shaders.\n", d3d->shader.passes);
|
||||
|
||||
for (unsigned i = 0; i < d3d->shader.passes; i++)
|
||||
{
|
||||
|
@ -654,7 +654,7 @@ static int exynos_init(struct exynos_data *pdata, unsigned bpp) {
|
||||
}
|
||||
|
||||
if (drm->mode == NULL) {
|
||||
RARCH_ERR("video_exynos: requested resolution (%dx%d) not available\n",
|
||||
RARCH_ERR("video_exynos: requested resolution (%ux%u) not available\n",
|
||||
g_settings.video.fullscreen_x, g_settings.video.fullscreen_y);
|
||||
goto fail;
|
||||
}
|
||||
|
@ -45,12 +45,12 @@ bool gfx_get_fps(char *buf, size_t size, char *buf_fps, size_t size_fps)
|
||||
last_fps = time_to_fps(time, new_time, FPS_UPDATE_INTERVAL);
|
||||
time = new_time;
|
||||
|
||||
snprintf(buf, size, "%s || FPS: %6.1f || Frames: %d", g_extern.title_buf, last_fps, g_extern.frame_count);
|
||||
snprintf(buf, size, "%s || FPS: %6.1f || Frames: %u", g_extern.title_buf, last_fps, g_extern.frame_count);
|
||||
ret = true;
|
||||
}
|
||||
|
||||
if (buf_fps)
|
||||
snprintf(buf_fps, size_fps, "FPS: %6.1f || Frames: %d", last_fps, g_extern.frame_count);
|
||||
snprintf(buf_fps, size_fps, "FPS: %6.1f || Frames: %u", last_fps, g_extern.frame_count);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -371,7 +371,7 @@ static int omapfb_alloc_mem(omapfb_data_t *pdata) {
|
||||
mi.size = mem_size;
|
||||
|
||||
if (ioctl(pdata->fd, OMAPFB_SETUP_MEM, &mi) != 0) {
|
||||
RARCH_ERR("video_omap: allocation of %d bytes of VRAM failed\n", mem_size);
|
||||
RARCH_ERR("video_omap: allocation of %u bytes of VRAM failed\n", mem_size);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -358,12 +358,12 @@ static void handle_hotplug(android_input_t *android,
|
||||
{
|
||||
if (zeus_id < 0)
|
||||
{
|
||||
RARCH_LOG("zeus_pad 1 detected: %d\n", id);
|
||||
RARCH_LOG("zeus_pad 1 detected: %u\n", id);
|
||||
zeus_id = id;
|
||||
}
|
||||
else
|
||||
{
|
||||
RARCH_LOG("zeus_pad 2 detected: %d\n", id);
|
||||
RARCH_LOG("zeus_pad 2 detected: %u\n", id);
|
||||
zeus_second_id = id;
|
||||
}
|
||||
strlcpy(name_buf, "Xperia Play", sizeof(name_buf));
|
||||
|
@ -1391,7 +1391,7 @@ static bool input_try_autoconfigure_joypad_from_conf(config_file_t *conf,
|
||||
config_get_array(conf, "input_device", ident, sizeof(ident));
|
||||
config_get_array(conf, "input_driver", input_driver, sizeof(input_driver));
|
||||
|
||||
snprintf(ident_idx, sizeof(ident_idx), "%s_p%d", ident, index);
|
||||
snprintf(ident_idx, sizeof(ident_idx), "%s_p%u", ident, index);
|
||||
|
||||
//RARCH_LOG("ident_idx: %s\n", ident_idx);
|
||||
|
||||
|
@ -2458,7 +2458,7 @@ void PopulateDataForParamArray( CgParameterEntry* paramEntry, CgParameterEntry*
|
||||
*nvParamStrings += prefixLengthIn;
|
||||
}
|
||||
// rest of array name for array and index
|
||||
sprintf( *nvParamStrings, "%s[%d]", ( strtab->data + paramEntry->nameOffset ), element );
|
||||
sprintf( *nvParamStrings, "%s[%u]", ( strtab->data + paramEntry->nameOffset ), element );
|
||||
|
||||
if (!prefix)
|
||||
prefix = *nvParamStrings;
|
||||
@ -2499,7 +2499,7 @@ void PopulateDataForParamArray( CgParameterEntry* paramEntry, CgParameterEntry*
|
||||
*nvParamStrings += prefixLengthIn;
|
||||
}
|
||||
// rest of array name for array and index
|
||||
sprintf( *nvParamStrings, "%s[%d]", ( strtab->data + paramEntry->nameOffset ), element );
|
||||
sprintf( *nvParamStrings, "%s[%u]", ( strtab->data + paramEntry->nameOffset ), element );
|
||||
*nvParamStrings += strlen( *nvParamStrings );
|
||||
prefixLength = strlen( prefix );
|
||||
|
||||
|
@ -264,7 +264,7 @@ static void ffmpeg_audio_resolve_sample_rate(ffmpeg_t *handle,
|
||||
}
|
||||
|
||||
params->sample_rate = best_rate;
|
||||
RARCH_LOG("[FFmpeg]: Using output sampling rate: %u.\n", best_rate);
|
||||
RARCH_LOG("[FFmpeg]: Using output sampling rate: %d.\n", best_rate);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1934,7 +1934,7 @@ static void set_savestate_auto_index(void)
|
||||
dir_list_free(dir_list);
|
||||
|
||||
g_settings.state_slot = max_index;
|
||||
RARCH_LOG("Found last state slot: #%u\n", g_settings.state_slot);
|
||||
RARCH_LOG("Found last state slot: #%d\n", g_settings.state_slot);
|
||||
}
|
||||
|
||||
static void deinit_savefiles(void)
|
||||
@ -2118,7 +2118,7 @@ static void rarch_save_state(const char *path,
|
||||
"Saved state to slot #-1 (auto).");
|
||||
else
|
||||
snprintf(msg, sizeof_msg,
|
||||
"Saved state to slot #%u.", g_settings.state_slot);
|
||||
"Saved state to slot #%d.", g_settings.state_slot);
|
||||
}
|
||||
else
|
||||
snprintf(msg, sizeof_msg,
|
||||
@ -2213,7 +2213,7 @@ static void state_slot(void)
|
||||
if (g_extern.msg_queue)
|
||||
msg_queue_clear(g_extern.msg_queue);
|
||||
|
||||
snprintf(msg, sizeof(msg), "State slot: %u",
|
||||
snprintf(msg, sizeof(msg), "State slot: %d",
|
||||
g_settings.state_slot);
|
||||
|
||||
if (g_extern.msg_queue)
|
||||
@ -2378,7 +2378,7 @@ static void check_movie_record(bool pressed)
|
||||
|
||||
if (g_settings.state_slot > 0)
|
||||
{
|
||||
snprintf(path, sizeof(path), "%s%u.bsv",
|
||||
snprintf(path, sizeof(path), "%s%d.bsv",
|
||||
g_extern.bsv.movie_path, g_settings.state_slot);
|
||||
}
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user