From bc74556792417c71203f218ed1bdef2dc594292a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Thu, 9 Mar 2017 21:41:09 -0800 Subject: [PATCH] Cleanup. --- tests/test.h | 4 ++++ tests/vector_complex_test.cpp | 2 ++ tools/bin2c/bin2c.cpp | 4 ++-- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/test.h b/tests/test.h index 223a04d..c4f0dce 100644 --- a/tests/test.h +++ b/tests/test.h @@ -8,7 +8,11 @@ #include +BX_PRAGMA_DIAGNOSTIC_PUSH(); +BX_PRAGMA_DIAGNOSTIC_IGNORED_MSVC(4312); // warning C4312 : 'reinterpret_cast' : conversion from 'int' to 'const char *' of greater size #include +BX_PRAGMA_DIAGNOSTIC_POP(); + #define TEST(_x) TEST_CASE(#_x, "") #define CHECK_EQUAL(_x, _y) REQUIRE(_x == _y) diff --git a/tests/vector_complex_test.cpp b/tests/vector_complex_test.cpp index a540ece..17f5119 100644 --- a/tests/vector_complex_test.cpp +++ b/tests/vector_complex_test.cpp @@ -37,6 +37,8 @@ # define _strdup strdup #endif // !BX_COMPILER_MSVC +BX_PRAGMA_DIAGNOSTIC_IGNORED_MSVC(4996) // warning C4996: 'strdup': The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _strdup. See online help for details. + struct complex { complex() {data = 0;} complex(const char* s) { data = strdup(s); } diff --git a/tools/bin2c/bin2c.cpp b/tools/bin2c/bin2c.cpp index 47fc3bc..d33d920 100644 --- a/tools/bin2c/bin2c.cpp +++ b/tools/bin2c/bin2c.cpp @@ -145,12 +145,12 @@ int main(int _argc, const char* _argv[]) } void* data = NULL; - size_t size = 0; + uint32_t size = 0; bx::CrtFileReader fr; if (bx::open(&fr, filePath) ) { - size = (size_t)bx::getSize(&fr); + size = uint32_t(bx::getSize(&fr) ); data = malloc(size); bx::read(&fr, data, size);