This commit is contained in:
Branimir Karadžić
2017-03-09 21:41:09 -08:00
parent 271ad24b84
commit bc74556792
3 changed files with 8 additions and 2 deletions

View File

@@ -8,7 +8,11 @@
#include <bx/bx.h>
BX_PRAGMA_DIAGNOSTIC_PUSH();
BX_PRAGMA_DIAGNOSTIC_IGNORED_MSVC(4312); // warning C4312 : 'reinterpret_cast' : conversion from 'int' to 'const char *' of greater size
#include <catch/catch.hpp>
BX_PRAGMA_DIAGNOSTIC_POP();
#define TEST(_x) TEST_CASE(#_x, "")
#define CHECK_EQUAL(_x, _y) REQUIRE(_x == _y)

View File

@@ -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); }

View File

@@ -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);