diff --git a/gfx/common/wayland/libdecor_sym.h b/gfx/common/wayland/libdecor_sym.h index 9339cb81ba..7c3611e631 100644 --- a/gfx/common/wayland/libdecor_sym.h +++ b/gfx/common/wayland/libdecor_sym.h @@ -16,11 +16,12 @@ #ifdef HAVE_LIBDECOR_H RA_WAYLAND_MODULE(WAYLAND_LIBDECOR) RA_WAYLAND_SYM(void, libdecor_unref, (struct libdecor *)) -RA_WAYLAND_SYM(struct libdecor *, libdecor_new, (struct wl_display *, struct libdecor_interface *)) +RA_WAYLAND_SYM(struct libdecor *, libdecor_new, (struct wl_display *,\ + const struct libdecor_interface *)) RA_WAYLAND_SYM(int, libdecor_dispatch, (struct libdecor *, int timeout)) RA_WAYLAND_SYM(struct libdecor_frame *, libdecor_decorate, (struct libdecor *,\ struct wl_surface *,\ - struct libdecor_frame_interface *,\ + const struct libdecor_frame_interface *,\ void *)) RA_WAYLAND_SYM(void, libdecor_frame_unref, (struct libdecor_frame *)) RA_WAYLAND_SYM(void, libdecor_frame_set_title, (struct libdecor_frame *, const char *)) diff --git a/gfx/display_servers/dispserv_kms.c b/gfx/display_servers/dispserv_kms.c index e434501847..c42f5c0ac3 100644 --- a/gfx/display_servers/dispserv_kms.c +++ b/gfx/display_servers/dispserv_kms.c @@ -52,7 +52,6 @@ static bool kms_display_server_set_resolution(void *data, { unsigned curr_width = 0; unsigned curr_height = 0; - unsigned curr_bpp = 0; float curr_refreshrate = 0; bool retval = false; int reinit_flags = DRIVERS_CMD_ALL; @@ -66,7 +65,6 @@ static bool kms_display_server_set_resolution(void *data, curr_refreshrate = drm_calc_refresh_rate(g_drm_mode); curr_width = g_drm_mode->hdisplay; curr_height = g_drm_mode->vdisplay; - curr_bpp = 32; } RARCH_DBG("[DRM]: Display server set resolution - incoming: %d x %d, %f Hz\n",width, height, hz); @@ -74,8 +72,6 @@ static bool kms_display_server_set_resolution(void *data, width = curr_width; if (height == 0) height = curr_height; - if (curr_bpp == 0) - curr_bpp = curr_bpp; if (hz == 0) hz = curr_refreshrate; diff --git a/gfx/drivers_context/wayland_ctx.c b/gfx/drivers_context/wayland_ctx.c index 24ef3b0090..1bfd88862a 100644 --- a/gfx/drivers_context/wayland_ctx.c +++ b/gfx/drivers_context/wayland_ctx.c @@ -270,7 +270,7 @@ static bool gfx_ctx_wl_egl_init_context(gfx_ctx_wayland_data_t *wl) egl_report_error(); return false; } - if (n == 0 || !&wl->egl.config) + if (n == 0 || !wl->egl.config) return false; return true; } diff --git a/gfx/drivers_context/xegl_ctx.c b/gfx/drivers_context/xegl_ctx.c index b96dfec615..94873ae80d 100644 --- a/gfx/drivers_context/xegl_ctx.c +++ b/gfx/drivers_context/xegl_ctx.c @@ -181,7 +181,7 @@ static void *gfx_ctx_xegl_init(void *video_driver) goto error; } - if (n == 0 || !&xegl->egl.config) + if (n == 0 || !xegl->egl.config) goto error; #endif diff --git a/gfx/video_crt_switch.c b/gfx/video_crt_switch.c index 7dc61f8914..79f51440c6 100644 --- a/gfx/video_crt_switch.c +++ b/gfx/video_crt_switch.c @@ -128,7 +128,7 @@ static void crt_switch_set_aspect( sr_state state; sr_get_state(&state); - if (srm_width >= state.super_width && !srm_isstretched) + if ((int)srm_width >= state.super_width && !srm_isstretched) RARCH_LOG("[CRT]: Super resolution detected. Fractal scaling @ X:%f Y:%f \n", srm_xscale, srm_yscale); else if (srm_isstretched && srm_width > 0 ) RARCH_LOG("[CRT]: Resolution is stretched. Fractal scaling @ X:%f Y:%f \n", srm_xscale, srm_yscale); diff --git a/input/common/wayland_common.h b/input/common/wayland_common.h index 6127e497a5..bb597da742 100644 --- a/input/common/wayland_common.h +++ b/input/common/wayland_common.h @@ -96,13 +96,13 @@ typedef struct surface_output struct wl_list link; } surface_output_t; -typedef struct gfx_ctx_wayland_data gfx_ctx_wayland_data_t; +struct gfx_ctx_wayland_data; typedef struct input_ctx_wayland_data { struct wl_display *dpy; const input_device_driver_t *joypad; - gfx_ctx_wayland_data_t *gfx; + struct gfx_ctx_wayland_data *gfx; int fd; diff --git a/libretro-common/features/features_cpu.c b/libretro-common/features/features_cpu.c index d067612579..80fe2c1bee 100644 --- a/libretro-common/features/features_cpu.c +++ b/libretro-common/features/features_cpu.c @@ -833,8 +833,9 @@ void cpu_features_get_model_name(char *name, int len) { #if defined(CPU_X86) && !defined(__MACH__) union { - int i[4]; - unsigned char s[16]; + int32_t i[4]; + uint32_t u[4]; + uint8_t s[16]; } flags; int i, j; int pos = 0; @@ -845,7 +846,8 @@ void cpu_features_get_model_name(char *name, int len) x86_cpuid(0x80000000, flags.i); - if (flags.i[0] < 0x80000004) + /* Check for additional cpuid attributes availability */ + if (flags.u[0] < 0x80000004) return; for (i = 0; i < 3; i++) diff --git a/libretro-common/formats/libchdr/libchdr_chd.c b/libretro-common/formats/libchdr/libchdr_chd.c index 07eb16608a..9a157cce8f 100644 --- a/libretro-common/formats/libchdr/libchdr_chd.c +++ b/libretro-common/formats/libchdr/libchdr_chd.c @@ -421,6 +421,7 @@ static INLINE UINT32 get_bigendian_uint32(const UINT8 *base) the data stream in bigendian order -------------------------------------------------*/ +#if 0 static INLINE void put_bigendian_uint32(UINT8 *base, UINT32 value) { base[0] = value >> 24; @@ -428,6 +429,7 @@ static INLINE void put_bigendian_uint32(UINT8 *base, UINT32 value) base[2] = value >> 8; base[3] = value; } +#endif /*------------------------------------------------- put_bigendian_uint24 - write a UINT24 to @@ -491,6 +493,7 @@ static INLINE void map_extract(const UINT8 *base, map_entry *entry) entry to the datastream -------------------------------------------------*/ +#if 0 static INLINE void map_assemble(UINT8 *base, map_entry *entry) { put_bigendian_uint64(&base[0], entry->offset); @@ -499,6 +502,7 @@ static INLINE void map_assemble(UINT8 *base, map_entry *entry) base[14] = entry->length >> 16; base[15] = entry->flags; } +#endif /*------------------------------------------------- map_size_v5 - calculate CHDv5 map size