diff --git a/decompress/7zip_support.c b/decompress/7zip_support.c index 4b223d8daa..1dacc2baae 100644 --- a/decompress/7zip_support.c +++ b/decompress/7zip_support.c @@ -22,6 +22,7 @@ #include #include "../miscellaneous.h" #include "../file_path.h" +#include "7zip_support.h" #include "../deps/7zip/7z.h" #include "../deps/7zip/7zAlloc.h" diff --git a/frontend/menu/menu_entries.c b/frontend/menu/menu_entries.c index 03f6c51a57..e67bc6cc1d 100644 --- a/frontend/menu/menu_entries.c +++ b/frontend/menu/menu_entries.c @@ -816,7 +816,7 @@ int menu_parse_and_resolve(file_list_t *list, file_list_t *menu_list) list_size = str_list->size; for (i = 0; i < str_list->size; i++) { - menu_file_type_t file_type = 0; + menu_file_type_t file_type = MENU_FILE_NONE; switch (str_list->elems[i].attr.i) { case RARCH_DIRECTORY: diff --git a/gfx/context/sdl_gl_ctx.c b/gfx/context/sdl_gl_ctx.c index 0d1d8e03a0..dc1280b9fe 100644 --- a/gfx/context/sdl_gl_ctx.c +++ b/gfx/context/sdl_gl_ctx.c @@ -352,7 +352,7 @@ static void sdl_ctx_input_driver(void *data, const input_driver_t **input, void static gfx_ctx_proc_t sdl_ctx_get_proc_address(const char *name) { - return SDL_GL_GetProcAddress(name); + return (gfx_ctx_proc_t)SDL_GL_GetProcAddress(name); } static void sdl_ctx_show_mouse(void *data, bool state) diff --git a/gfx/context/wayland_ctx.c b/gfx/context/wayland_ctx.c index 8ed2716bbf..c5872d0da9 100644 --- a/gfx/context/wayland_ctx.c +++ b/gfx/context/wayland_ctx.c @@ -104,9 +104,9 @@ static void registry_handle_global(void *data, struct wl_registry *reg, uint32_t (void)version; if (!strcmp(interface, "wl_compositor")) - g_compositor = wl_registry_bind(reg, id, &wl_compositor_interface, 1); + g_compositor = (struct wl_compositor*)wl_registry_bind(reg, id, &wl_compositor_interface, 1); else if (!strcmp(interface, "wl_shell")) - g_shell = wl_registry_bind(reg, id, &wl_shell_interface, 1); + g_shell = (struct wl_shell*)wl_registry_bind(reg, id, &wl_shell_interface, 1); } static void registry_handle_global_remove(void *data, struct wl_registry *registry, @@ -285,7 +285,10 @@ static bool gfx_ctx_init(void *data) EGL_NONE, }; + EGLint egl_major = 0, egl_minor = 0; + EGLint num_configs; const EGLint *attrib_ptr; + switch (g_api) { case GFX_CTX_OPENGL_API: @@ -340,7 +343,6 @@ static bool gfx_ctx_init(void *data) goto error; } - EGLint egl_major = 0, egl_minor = 0; if (!eglInitialize(g_egl_dpy, &egl_major, &egl_minor)) { RARCH_ERR("Failed to initialize EGL.\n"); @@ -348,7 +350,6 @@ static bool gfx_ctx_init(void *data) } RARCH_LOG("[Wayland/EGL]: EGL version: %d.%d\n", egl_major, egl_minor); - EGLint num_configs; if (!eglChooseConfig(g_egl_dpy, attrib_ptr, &g_config, 1, &num_configs)) { RARCH_ERR("[Wayland/EGL]: eglChooseConfig failed with 0x%x.\n", eglGetError()); @@ -717,7 +718,7 @@ static const struct wl_pointer_listener pointer_listener = { }; static void seat_handle_capabilities(void *data, -struct wl_seat *seat, enum wl_seat_capability caps) +struct wl_seat *seat, unsigned caps) { if ((caps & WL_SEAT_CAPABILITY_KEYBOARD) && !g_wl_keyboard) { diff --git a/input/sdl_joypad.c b/input/sdl_joypad.c index 285fecb78a..768d938022 100644 --- a/input/sdl_joypad.c +++ b/input/sdl_joypad.c @@ -60,7 +60,7 @@ static uint8_t pad_get_button(sdl_joypad_t *pad, unsigned button) #ifdef HAVE_SDL2 /* TODO: see if a LUT like winxinput_joypad.c's button_index_to_bitmap_code is needed. */ if (pad->controller) - return SDL_GameControllerGetButton(pad->controller, button); + return SDL_GameControllerGetButton(pad->controller, (SDL_GameControllerButton)button); #endif return SDL_JoystickGetButton(pad->joypad, button); } @@ -79,7 +79,7 @@ static int16_t pad_get_axis(sdl_joypad_t *pad, unsigned axis) #ifdef HAVE_SDL2 /* TODO: see if a rarch <-> sdl translation is needed. */ if (pad->controller) - return SDL_GameControllerGetAxis(pad->controller, axis); + return SDL_GameControllerGetAxis(pad->controller, (SDL_GameControllerAxis)axis); #endif return SDL_JoystickGetAxis(pad->joypad, axis); }