Merge pull request #6039 from orbea/clang

C89_BUILD: Fix some clang compiler errors
This commit is contained in:
Twinaphex 2018-01-04 07:01:08 +01:00 committed by GitHub
commit 30bbfd88d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 3 deletions

View File

@ -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);

View File

@ -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));