From 89b5011759613ae77d4c8f79faf6e6e2f0c00c66 Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Fri, 23 Dec 2022 13:50:16 +0100 Subject: [PATCH 1/2] Update unzip.c - Fix compiler warning. --- contrib/unzip/unzip.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/unzip/unzip.c b/contrib/unzip/unzip.c index b2f045b0a..ba15257a9 100644 --- a/contrib/unzip/unzip.c +++ b/contrib/unzip/unzip.c @@ -1175,7 +1175,7 @@ extern int ZEXPORT unzOpenCurrentFile3(unzFile file, int *method, int *level, in pfile_in_zip_read_info->stream.zalloc = (alloc_func)0; pfile_in_zip_read_info->stream.zfree = (free_func)0; pfile_in_zip_read_info->stream.opaque = (voidpf)s; - pfile_in_zip_read_info->stream.next_in = 0; + pfile_in_zip_read_info->stream.next_in = (voidpf)0; pfile_in_zip_read_info->stream.avail_in = 0; #ifdef HAVE_APPLE_COMPRESSION @@ -1997,4 +1997,4 @@ extern int ZEXPORT unzEndOfFile(unzFile file) #ifdef _MSC_VER # pragma warning(pop) -#endif // _MSC_VER \ No newline at end of file +#endif // _MSC_VER From a8e50be781cd907bac86057d6f0091373f0190c4 Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Fri, 23 Dec 2022 16:19:39 +0100 Subject: [PATCH 2/2] Refactoring: Move asserthandler header to include --- code/CMakeLists.txt | 2 +- code/Common/AssertHandler.cpp | 2 +- {code/Common => include/assimp}/AssertHandler.h | 0 test/unit/Common/utAssertHandler.cpp | 2 +- test/unit/Common/utBaseProcess.cpp | 2 +- 5 files changed, 4 insertions(+), 4 deletions(-) rename {code/Common => include/assimp}/AssertHandler.h (100%) diff --git a/code/CMakeLists.txt b/code/CMakeLists.txt index b87bc665f..8f26d2daf 100644 --- a/code/CMakeLists.txt +++ b/code/CMakeLists.txt @@ -1,6 +1,5 @@ # Open Asset Import Library (assimp) # ---------------------------------------------------------------------- -# # Copyright (c) 2006-2022, assimp team # # All rights reserved. @@ -94,6 +93,7 @@ SET( PUBLIC_HEADERS ${HEADER_PATH}/vector3.inl ${HEADER_PATH}/version.h ${HEADER_PATH}/cimport.h + ${HEADER_PATH}/AssertHandler.h ${HEADER_PATH}/importerdesc.h ${HEADER_PATH}/Importer.hpp ${HEADER_PATH}/DefaultLogger.hpp diff --git a/code/Common/AssertHandler.cpp b/code/Common/AssertHandler.cpp index 469e7bec5..2fd4046ad 100644 --- a/code/Common/AssertHandler.cpp +++ b/code/Common/AssertHandler.cpp @@ -43,7 +43,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * @brief Implementation of assert handling logic. */ -#include "AssertHandler.h" +#include #include #include diff --git a/code/Common/AssertHandler.h b/include/assimp/AssertHandler.h similarity index 100% rename from code/Common/AssertHandler.h rename to include/assimp/AssertHandler.h diff --git a/test/unit/Common/utAssertHandler.cpp b/test/unit/Common/utAssertHandler.cpp index a2585fe65..039ba8345 100644 --- a/test/unit/Common/utAssertHandler.cpp +++ b/test/unit/Common/utAssertHandler.cpp @@ -47,7 +47,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #endif #include -#include +#include namespace { diff --git a/test/unit/Common/utBaseProcess.cpp b/test/unit/Common/utBaseProcess.cpp index 978af7e99..359042315 100644 --- a/test/unit/Common/utBaseProcess.cpp +++ b/test/unit/Common/utBaseProcess.cpp @@ -43,7 +43,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "UnitTestPCH.h" #include "Common/BaseProcess.h" -#include "Common/AssertHandler.h" +#include using namespace Assimp;