From bfeb0111f8c76d8c8008b79699bd0b37132302db Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 19 Sep 2016 18:29:10 +0200 Subject: [PATCH] Fix C89_BUILD errors --- libretro-common/file/archive_file.c | 2 +- libretro-common/file/archive_file_7z.c | 6 ++---- tasks/task_decompress.c | 14 ++++++++------ 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/libretro-common/file/archive_file.c b/libretro-common/file/archive_file.c index b152c1df3d..b1fa2873c2 100644 --- a/libretro-common/file/archive_file.c +++ b/libretro-common/file/archive_file.c @@ -252,7 +252,7 @@ static int file_archive_extract_cb(const char *name, const char *valid_exts, if (!string_is_equal_noncase(userdata->extracted_file_path, wanted_file)) - return 1; // keep searching for the right file + return 1; /* keep searching for the right file */ if (file_archive_perform_mode(new_path, valid_exts, cdata, cmode, csize, size, diff --git a/libretro-common/file/archive_file_7z.c b/libretro-common/file/archive_file_7z.c index 0c8fe262b6..e560569e9f 100644 --- a/libretro-common/file/archive_file_7z.c +++ b/libretro-common/file/archive_file_7z.c @@ -305,10 +305,8 @@ static int sevenzip_parse_file_init(file_archive_transfer_t *state, CrcGenerateTable(); SzArEx_Init(&sevenzip_context->db); - SRes res = SzArEx_Open(&sevenzip_context->db, &sevenzip_context->lookStream.s, - &sevenzip_context->allocImp, &sevenzip_context->allocTempImp); - - if (res != SZ_OK) + if (SzArEx_Open(&sevenzip_context->db, &sevenzip_context->lookStream.s, + &sevenzip_context->allocImp, &sevenzip_context->allocTempImp) != SZ_OK) return -1; return 0; diff --git a/tasks/task_decompress.c b/tasks/task_decompress.c index 90da4dd99c..91dd67e70c 100644 --- a/tasks/task_decompress.c +++ b/tasks/task_decompress.c @@ -143,14 +143,15 @@ static void task_decompress_handler_finished(retro_task_t *task, static void task_decompress_handler(retro_task_t *task) { + int ret; bool retdec = false; decompress_state_t *dec = (decompress_state_t*)task->state; struct archive_extract_userdata userdata = {0}; - userdata.dec = dec; - userdata.archive_path = dec->source_file; + userdata.dec = dec; + userdata.archive_path = dec->source_file; - int ret = file_archive_parse_file_iterate(&dec->archive, + ret = file_archive_parse_file_iterate(&dec->archive, &retdec, dec->source_file, dec->valid_ext, file_decompressed, &userdata); @@ -187,17 +188,18 @@ static void task_decompress_handler_target_file(retro_task_t *task) static void task_decompress_handler_subdir(retro_task_t *task) { + int ret; bool retdec; decompress_state_t *dec = (decompress_state_t*)task->state; struct archive_extract_userdata userdata = {0}; - userdata.dec = dec; + userdata.dec = dec; - int ret = file_archive_parse_file_iterate(&dec->archive, + ret = file_archive_parse_file_iterate(&dec->archive, &retdec, dec->source_file, dec->valid_ext, file_decompressed_subdir, &userdata); - task->progress = file_archive_parse_file_progress(&dec->archive); + task->progress = file_archive_parse_file_progress(&dec->archive); if (task->cancelled || ret != 0) {