From d333bd0f77141d495bd8ae39812162c56dee740d Mon Sep 17 00:00:00 2001 From: Alcaro Date: Fri, 26 Jun 2015 19:35:33 +0200 Subject: [PATCH] Fix more C89 fails. --- Makefile.common | 2 +- audio/drivers/alsathread.c | 4 ++-- deps/zlib/ioapi.h | 4 ++-- deps/zlib/unzip.c | 6 +++--- libretro-db/libretrodb.c | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Makefile.common b/Makefile.common index cb9c9e7f77..29aa0ae3e0 100644 --- a/Makefile.common +++ b/Makefile.common @@ -123,7 +123,7 @@ OBJ += frontend/frontend.o \ libretro-common/string/stdstring.o \ dir_list_special.o \ file_ops.o \ - libretro-common/file//nbio/nbio_stdio.o \ + libretro-common/file/nbio/nbio_stdio.o \ libretro-common/file/file_path.o \ file_path_special.o \ libretro-common/hash/rhash.o \ diff --git a/audio/drivers/alsathread.c b/audio/drivers/alsathread.c index 07a217aeff..fcddbae17e 100644 --- a/audio/drivers/alsathread.c +++ b/audio/drivers/alsathread.c @@ -60,6 +60,7 @@ static void alsa_worker_thread(void *data) { size_t avail; size_t fifo_size; + snd_pcm_sframes_t frames; slock_lock(alsa->fifo_lock); avail = fifo_read_avail(alsa->buffer); fifo_size = min(alsa->period_size, avail); @@ -70,8 +71,7 @@ static void alsa_worker_thread(void *data) /* If underrun, fill rest with silence. */ memset(buf + fifo_size, 0, alsa->period_size - fifo_size); - snd_pcm_sframes_t frames = snd_pcm_writei( - alsa->pcm, buf, alsa->period_frames); + frames = snd_pcm_writei(alsa->pcm, buf, alsa->period_frames); if (frames == -EPIPE || frames == -EINTR || frames == -ESTRPIPE) diff --git a/deps/zlib/ioapi.h b/deps/zlib/ioapi.h index 8309c4cf8f..14bf58c648 100644 --- a/deps/zlib/ioapi.h +++ b/deps/zlib/ioapi.h @@ -23,8 +23,8 @@ #if (!defined(_WIN32)) && (!defined(WIN32)) - // Linux needs this to support file operation on files larger then 4+GB - // But might need better if/def to select just the platforms that needs them. + /* Linux needs this to support file operation on files larger then 4+GB */ + /* But might need better if/def to select just the platforms that needs them. */ #ifndef __USE_FILE_OFFSET64 #define __USE_FILE_OFFSET64 diff --git a/deps/zlib/unzip.c b/deps/zlib/unzip.c index ba6abbfbbe..99f84773a5 100644 --- a/deps/zlib/unzip.c +++ b/deps/zlib/unzip.c @@ -960,7 +960,7 @@ local int unz64local_GetCurrentFileInfoInternal (unzFile file, if (unz64local_getLong(&s->z_filefunc, s->filestream,&file_info.external_fa) != UNZ_OK) err=UNZ_ERRNO; - // relative offset of local header + /* relative offset of local header */ if (unz64local_getLong(&s->z_filefunc, s->filestream,&uL) != UNZ_OK) err=UNZ_ERRNO; file_info_internal.offset_curfile = uL; @@ -983,7 +983,7 @@ local int unz64local_GetCurrentFileInfoInternal (unzFile file, lSeek -= uSizeRead; } - // Read extrafield + /* Read extrafield */ if ((err==UNZ_OK) && (extraField!=NULL)) { ZPOS64_T uSizeRead ; @@ -1014,7 +1014,7 @@ local int unz64local_GetCurrentFileInfoInternal (unzFile file, { uLong acc = 0; - // since lSeek now points to after the extra field we need to move back + /* since lSeek now points to after the extra field we need to move back */ lSeek -= file_info.size_file_extra; if (lSeek!=0) diff --git a/libretro-db/libretrodb.c b/libretro-db/libretrodb.c index c834e001cd..99fbb48722 100644 --- a/libretro-db/libretrodb.c +++ b/libretro-db/libretrodb.c @@ -87,8 +87,8 @@ int libretrodb_create(FILE *fp, libretrodb_value_provider value_provider, off_t root; libretrodb_metadata_t md; uint64_t item_count = 0; - struct rmsgpack_dom_value item = {}; - libretrodb_header_t header = {}; + struct rmsgpack_dom_value item = {0}; + libretrodb_header_t header = {0}; memcpy(header.magic_number, MAGIC_NUMBER, sizeof(MAGIC_NUMBER)-1); root = flseek(fp, 0, SEEK_CUR);