diff --git a/input/input_driver.c b/input/input_driver.c index d19414199f..931da37956 100644 --- a/input/input_driver.c +++ b/input/input_driver.c @@ -2658,11 +2658,11 @@ void input_config_get_bind_string(char *buf, const struct retro_keybind *bind, break; } /* switch ( bind->mbutton ) */ - if ( tag != 0 ) { - if ( delim ) { + if (tag != 0) + { + if (delim) strlcat(buf, ", ", size); - } - strlcat( buf, msg_hash_to_str(tag), size ); + strlcat(buf, msg_hash_to_str((msg_hash_enums)tag), size ); delim = 1; } } diff --git a/libretro-common/compat/compat_strl.c b/libretro-common/compat/compat_strl.c index 3473ba56d3..9886b22ed2 100644 --- a/libretro-common/compat/compat_strl.c +++ b/libretro-common/compat/compat_strl.c @@ -64,7 +64,7 @@ size_t strlcat(char *dest, const char *source, size_t size) char *strldup(const char *s, size_t n) { - char *dst = malloc(sizeof(char) * (n + 1)); + char *dst = (char*)malloc(sizeof(char) * (n + 1)); strlcpy(dst, s, n); return dst; } diff --git a/libretro-common/file/nbio/nbio_windowsmmap.c b/libretro-common/file/nbio/nbio_windowsmmap.c index 1777398136..17e2a2332d 100644 --- a/libretro-common/file/nbio/nbio_windowsmmap.c +++ b/libretro-common/file/nbio/nbio_windowsmmap.c @@ -79,7 +79,7 @@ static void *nbio_mmap_win32_open(const char * filename, unsigned mode) ptr = MapViewOfFile(mem, is_write ? (FILE_MAP_READ|FILE_MAP_WRITE) : FILE_MAP_READ, 0, 0, len.QuadPart); CloseHandle(mem); - handle = malloc(sizeof(struct nbio_mmap_win32_t)); + handle = (nbio_mmap_win32_t*)malloc(sizeof(struct nbio_mmap_win32_t)); handle->file = file; handle->is_write = is_write; diff --git a/menu/cbs/menu_cbs_ok.c b/menu/cbs/menu_cbs_ok.c index 638d0e40ce..588c705ed2 100644 --- a/menu/cbs/menu_cbs_ok.c +++ b/menu/cbs/menu_cbs_ok.c @@ -1368,7 +1368,7 @@ static int default_action_ok_load_content_with_core_from_menu(const char *_path, content_info.argv = NULL; content_info.args = NULL; content_info.environ_get = NULL; - if (!task_push_load_content_with_core_from_menu(_path, &content_info, _type, NULL, NULL)) + if (!task_push_load_content_with_core_from_menu(_path, &content_info, (rarch_core_type)_type, NULL, NULL)) return -1; return 0; } diff --git a/tasks/task_file_transfer.c b/tasks/task_file_transfer.c index de00534f4d..9d8ed3976a 100644 --- a/tasks/task_file_transfer.c +++ b/tasks/task_file_transfer.c @@ -67,7 +67,7 @@ void task_file_load_handler(retro_task_t *task) case NBIO_STATUS_INIT: if (nbio && !string_is_empty(nbio->path)) { - struct nbio_t *handle = nbio_open(nbio->path, NBIO_READ); + struct nbio_t *handle = (struct nbio_t*)nbio_open(nbio->path, NBIO_READ); if (handle) {