diff --git a/libretro-common/file/config_file.c b/libretro-common/file/config_file.c index 18259e319e..953abc25d1 100644 --- a/libretro-common/file/config_file.c +++ b/libretro-common/file/config_file.c @@ -874,11 +874,7 @@ void config_set_uint64(config_file_t *conf, const char *key, uint64_t val) char buf[128]; buf[0] = '\0'; -#ifdef _WIN32 - snprintf(buf, sizeof(buf), "%I64u", val); -#else - snprintf(buf, sizeof(buf), "%llu", (long long unsigned)val); -#endif + snprintf(buf, sizeof(buf), STRING_REP_UINT64, val); config_set_string(conf, key, buf); } diff --git a/libretro-common/streams/chd_stream.c b/libretro-common/streams/chd_stream.c index 94c1e22329..4139e501fe 100644 --- a/libretro-common/streams/chd_stream.c +++ b/libretro-common/streams/chd_stream.c @@ -321,7 +321,7 @@ ssize_t chdstream_read(chdstream_t *stream, void *data, size_t bytes) uint32_t amount; size_t data_offset = 0; const chd_header *hd = chd_get_header(stream->chd); - uint8_t *out = data; + uint8_t *out = (uint8_t*)data; if (stream->track_end - stream->offset < bytes) bytes = stream->track_end - stream->offset; diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c index b786cf1997..f0231b7075 100644 --- a/menu/menu_displaylist.c +++ b/menu/menu_displaylist.c @@ -831,73 +831,27 @@ static int menu_displaylist_parse_system_info(menu_displaylist_info_t *info) if (memory_used != 0 && memory_total != 0) { -#ifdef _WIN32 snprintf(tmp, sizeof(tmp), - "%s %s: %Iu/%Iu B", + "%s %s: " STRING_REP_UINT64 "/" STRING_REP_UINT64 " B", msg_hash_to_str(MSG_MEMORY), msg_hash_to_str(MSG_IN_BYTES), memory_used, memory_total ); snprintf(tmp2, sizeof(tmp2), - "%s %s: %Iu/%Iu MB", + "%s %s: " STRING_REP_UINT64 "/" STRING_REP_UINT64 " MB", msg_hash_to_str(MSG_MEMORY), msg_hash_to_str(MSG_IN_MEGABYTES), bytes_to_mb(memory_used), bytes_to_mb(memory_total) ); snprintf(tmp3, sizeof(tmp3), - "%s %s: %Iu/%Iu GB", + "%s %s: " STRING_REP_UINT64 "/" STRING_REP_UINT64 " GB", msg_hash_to_str(MSG_MEMORY), msg_hash_to_str(MSG_IN_GIGABYTES), bytes_to_gb(memory_used), bytes_to_gb(memory_total) ); -#elif defined(__STDC_VERSION__) && __STDC_VERSION__>=199901L - snprintf(tmp, sizeof(tmp), - "%s %s : %llu/%llu B", - msg_hash_to_str(MSG_MEMORY), - msg_hash_to_str(MSG_IN_BYTES), - (unsigned long long)memory_used, - (unsigned long long)memory_total - ); - snprintf(tmp2, sizeof(tmp2), - "%s %s : %llu/%llu MB", - msg_hash_to_str(MSG_MEMORY), - msg_hash_to_str(MSG_IN_MEGABYTES), - (unsigned long long)bytes_to_mb(memory_used), - (unsigned long long)bytes_to_mb(memory_total) - ); - snprintf(tmp3, sizeof(tmp3), - "%s %s: %llu/%llu GB", - msg_hash_to_str(MSG_MEMORY), - msg_hash_to_str(MSG_IN_GIGABYTES), - (unsigned long long)bytes_to_gb(memory_used), - (unsigned long long)bytes_to_gb(memory_total) - ); -#else - snprintf(tmp, sizeof(tmp), - "%s %s: %lu/%lu B", - msg_hash_to_str(MSG_MEMORY), - msg_hash_to_str(MSG_IN_BYTES), - memory_used, - memory_total - ); - snprintf(tmp2, sizeof(tmp2), - "%s %s : %lu/%lu MB", - msg_hash_to_str(MSG_MEMORY), - msg_hash_to_str(MSG_IN_MEGABYTES), - bytes_to_mb(memory_used), - bytes_to_mb(memory_total) - ); - snprintf(tmp3, sizeof(tmp3), - "%s %s : %lu/%lu GB", - msg_hash_to_str(MSG_MEMORY), - msg_hash_to_str(MSG_IN_GIGABYTES), - bytes_to_gb(memory_used), - bytes_to_gb(memory_total) - ); -#endif menu_entries_append_enum(info->list, tmp, "", MENU_ENUM_LABEL_SYSTEM_INFO_ENTRY, MENU_SETTINGS_CORE_INFO_NONE, 0, 0);