From ed41061adcfbc99986d2ad71ceb5a184f3ce3f17 Mon Sep 17 00:00:00 2001 From: sorgelig Date: Thu, 10 Jan 2019 09:52:27 +0800 Subject: [PATCH] Fix the warnings. --- file_io.cpp | 4 ++-- support/sharpmz/sharpmz.cpp | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/file_io.cpp b/file_io.cpp index d70320e..fdeff8a 100644 --- a/file_io.cpp +++ b/file_io.cpp @@ -1085,7 +1085,7 @@ int ScanDirectory(char* path, int mode, const char *extension, int options, cons mz_zip_archive *z = nullptr; if (is_zipped) { - mz_zip_archive _z = { 0 }; + mz_zip_archive _z = {}; if (!mz_zip_reader_init_file(&_z, zip_path.c_str(), 0)) { printf("Couldn't open zip file %s: %s\n", full_path, mz_zip_get_error_string(mz_zip_get_last_error(z))); @@ -1112,7 +1112,7 @@ int ScanDirectory(char* path, int mode, const char *extension, int options, cons scheduler_yield(); } - struct dirent _de = { 0 }; + struct dirent _de = {}; if (z) { mz_zip_reader_get_filename(z, i, &_de.d_name[0], sizeof(_de.d_name)); if (!IsInSameFolder(file_path_in_zip.c_str(), _de.d_name)) diff --git a/support/sharpmz/sharpmz.cpp b/support/sharpmz/sharpmz.cpp index 4cb8c30..9ce9c2d 100644 --- a/support/sharpmz/sharpmz.cpp +++ b/support/sharpmz/sharpmz.cpp @@ -61,7 +61,6 @@ int sharpmz_file_write(fileTYPE *file, const char *fileName) { int ret; char fullPath[1024]; - struct stat64 st; sprintf(fullPath, "%s/%s/%s", getRootDir(), SHARPMZ_CORE_NAME, fileName);