diff --git a/gfx/common/x11_common.c b/gfx/common/x11_common.c index 3107da4aa8..fd2832536b 100644 --- a/gfx/common/x11_common.c +++ b/gfx/common/x11_common.c @@ -386,6 +386,7 @@ bool x11_get_metrics(void *data, static void x11_handle_key_event(XEvent *event, XIC ic, bool filter) { int i; + Status status; uint32_t chars[32]; unsigned key = 0; uint16_t mod = 0; @@ -404,7 +405,7 @@ static void x11_handle_key_event(XEvent *event, XIC ic, bool filter) keybuf[0] = '\0'; #ifdef X_HAVE_UTF8_STRING - Status status = 0; + status = 0; /* XwcLookupString doesn't seem to work. */ num = Xutf8LookupString(ic, &event->xkey, keybuf, ARRAY_SIZE(keybuf), &keysym, &status); diff --git a/libretro-common/formats/libchdr/chd.c b/libretro-common/formats/libchdr/chd.c index 447c08268f..6e9d5ea3bf 100644 --- a/libretro-common/formats/libchdr/chd.c +++ b/libretro-common/formats/libchdr/chd.c @@ -604,6 +604,7 @@ void cdlz_codec_free(void* codec) chd_error cdlz_codec_decompress(void *codec, const uint8_t *src, uint32_t complen, uint8_t *dest, uint32_t destlen) { + uint8_t *sector; uint32_t framenum; cdlz_codec_data* cdlz = (cdlz_codec_data*)codec; @@ -636,7 +637,7 @@ chd_error cdlz_codec_decompress(void *codec, const uint8_t *src, uint32_t comple #ifdef WANT_RAW_DATA_SECTOR /* reconstitute the ECC data and sync header */ - uint8_t *sector = &dest[framenum * CD_FRAME_SIZE]; + sector = (uint8_t *)&dest[framenum * CD_FRAME_SIZE]; if ((src[framenum / 8] & (1 << (framenum % 8))) != 0) { memcpy(sector, s_cd_sync_header, sizeof(s_cd_sync_header)); @@ -690,6 +691,7 @@ void cdzl_codec_free(void *codec) chd_error cdzl_codec_decompress(void *codec, const uint8_t *src, uint32_t complen, uint8_t *dest, uint32_t destlen) { + uint8_t *sector; uint32_t framenum; cdzl_codec_data* cdzl = (cdzl_codec_data*)codec; @@ -720,7 +722,7 @@ chd_error cdzl_codec_decompress(void *codec, const uint8_t *src, uint32_t comple #ifdef WANT_RAW_DATA_SECTOR /* reconstitute the ECC data and sync header */ - uint8_t *sector = &dest[framenum * CD_FRAME_SIZE]; + sector = (uint8_t *)&dest[framenum * CD_FRAME_SIZE]; if ((src[framenum / 8] & (1 << (framenum % 8))) != 0) { memcpy(sector, s_cd_sync_header, sizeof(s_cd_sync_header));