Fix some printf format specifiers

Gets rid of warnings on higher warning levels
This commit is contained in:
Lioncash 2015-04-03 15:09:14 -04:00
parent 4f2547976c
commit b68048e6db
5 changed files with 15 additions and 15 deletions

View File

@ -412,7 +412,7 @@ static void gl_compute_fbo_geometry(gl_t *gl, unsigned width, unsigned height,
}
if (size_modified)
RARCH_WARN("FBO textures exceeded maximum size of GPU (%ux%u). Resizing to fit.\n", max_size, max_size);
RARCH_WARN("FBO textures exceeded maximum size of GPU (%dx%d). Resizing to fit.\n", max_size, max_size);
last_width = fbo_rect->img_width;
last_height = fbo_rect->img_height;
@ -670,7 +670,7 @@ static bool gl_init_hw_render(gl_t *gl, unsigned width, unsigned height)
RARCH_LOG("[GL]: Initializing HW render (%u x %u).\n", width, height);
glGetIntegerv(GL_MAX_TEXTURE_SIZE, &max_fbo_size);
glGetIntegerv(RARCH_GL_MAX_RENDERBUFFER_SIZE, &max_renderbuffer_size);
RARCH_LOG("[GL]: Max texture size: %d px, renderbuffer size: %u px.\n",
RARCH_LOG("[GL]: Max texture size: %d px, renderbuffer size: %d px.\n",
max_fbo_size, max_renderbuffer_size);
if (!gl_check_fbo_proc(gl))

View File

@ -1391,7 +1391,7 @@ static int deferred_push_core_cheat_options(void *data, void *userdata,
for (i = 0; i < cheat->size; i++)
{
char cheat_label[64];
snprintf(cheat_label, sizeof(cheat_label), "Cheat #%d: ", i);
snprintf(cheat_label, sizeof(cheat_label), "Cheat #%u: ", i);
if (cheat->cheats[i].desc)
strlcat(cheat_label, cheat->cheats[i].desc, sizeof(cheat_label));
menu_list_push(list, cheat_label, "", MENU_SETTINGS_CHEAT_BEGIN + i, 0);

View File

@ -161,7 +161,7 @@ void menu_input_st_cheat_callback(void *userdata, const char *str)
if (cheat && str && *str)
{
unsigned cheat_index = menu->keyboard.type - MENU_SETTINGS_CHEAT_BEGIN;
RARCH_LOG("cheat_index is: %d\n", cheat_index);
RARCH_LOG("cheat_index is: %u\n", cheat_index);
cheat->cheats[cheat_index].code = strdup(str);
cheat->cheats[cheat_index].state = true;

View File

@ -474,7 +474,7 @@ static int rarch_main_data_image_iterate_process_transfer_parse(nbio_handle_t *n
if (nbio->image.handle && nbio->image.cb)
nbio->image.cb(nbio, len);
RARCH_LOG("Image transfer processing took %d frames.\n", (unsigned)nbio->image.processing_frame_count);
RARCH_LOG("Image transfer processing took %u frames.\n", (unsigned)nbio->image.processing_frame_count);
return 0;
}
@ -485,7 +485,7 @@ static int rarch_main_data_image_iterate_transfer_parse(nbio_handle_t *nbio)
if (nbio->image.handle && nbio->image.cb)
nbio->image.cb(nbio, len);
RARCH_LOG("Image transfer took %d frames.\n", (unsigned)nbio->image.frame_count);
RARCH_LOG("Image transfer took %u frames.\n", (unsigned)nbio->image.frame_count);
return 0;
}
@ -621,7 +621,7 @@ static int rarch_main_data_nbio_iterate_parse(nbio_handle_t *nbio)
if (nbio->cb)
nbio->cb(nbio, len);
RARCH_LOG("File transfer took %d frames.\n", (unsigned)nbio->frame_count);
RARCH_LOG("File transfer took %u frames.\n", (unsigned)nbio->frame_count);
return 0;
}

View File

@ -2901,7 +2901,7 @@ static void get_string_representation_bind_device(void * data, char *type_str,
strlcpy(type_str, device_name, type_str_size);
else
snprintf(type_str, type_str_size,
"N/A (port #%d)", map);
"N/A (port #%u)", map);
}
else
strlcpy(type_str, "Disabled", type_str_size);
@ -4866,7 +4866,7 @@ static bool setting_append_list_input_options(
static char label_bind_defaults[MAX_USERS][64];
snprintf(key[user], sizeof(key[user]),
"input_player%d_joypad_index", user + 1);
"input_player%u_joypad_index", user + 1);
snprintf(key_type[user], sizeof(key_type[user]),
"input_libretro_device_p%u", user + 1);
snprintf(key_analog[user], sizeof(key_analog[user]),
@ -4877,15 +4877,15 @@ static bool setting_append_list_input_options(
"input_player%u_bind_defaults", user + 1);
snprintf(label[user], sizeof(label[user]),
"User %d Device Index", user + 1);
"User %u Device Index", user + 1);
snprintf(label_type[user], sizeof(label_type[user]),
"User %d Device Type", user + 1);
"User %u Device Type", user + 1);
snprintf(label_analog[user], sizeof(label_analog[user]),
"User %d Analog To Digital Type", user + 1);
"User %u Analog To Digital Type", user + 1);
snprintf(label_bind_all[user], sizeof(label_bind_all[user]),
"User %d Bind All", user + 1);
"User %u Bind All", user + 1);
snprintf(label_bind_defaults[user], sizeof(label_bind_defaults[user]),
"User %d Bind Default All", user + 1);
"User %u Bind Default All", user + 1);
CONFIG_UINT(
settings->input.libretro_device[user],
@ -5028,7 +5028,7 @@ static bool setting_append_list_input_options(
const struct retro_keybind* const defaults =
(user == 0) ? retro_keybinds_1 : retro_keybinds_rest;
snprintf(buffer[user], sizeof(buffer[user]), "User %d", user + 1);
snprintf(buffer[user], sizeof(buffer[user]), "User %u", user + 1);
START_SUB_GROUP(
list,