From 5c10e94533d67cd51bac2115c5482daf20f602ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Thu, 22 Dec 2016 21:14:16 -0800 Subject: [PATCH] Fixed warnings. --- 3rdparty/glslang/glslang/Include/Common.h | 2 +- 3rdparty/tinyexr/tinyexr.cc | 2 -- examples/common/bgfx_utils.cpp | 1 + makefile | 3 +++ scripts/texturec.lua | 1 - tools/texturec/texturec.cpp | 9 ++++++++- 6 files changed, 13 insertions(+), 5 deletions(-) delete mode 100644 3rdparty/tinyexr/tinyexr.cc diff --git a/3rdparty/glslang/glslang/Include/Common.h b/3rdparty/glslang/glslang/Include/Common.h index e082356cc..1433770cf 100644 --- a/3rdparty/glslang/glslang/Include/Common.h +++ b/3rdparty/glslang/glslang/Include/Common.h @@ -37,7 +37,7 @@ #ifndef _COMMON_INCLUDED_ #define _COMMON_INCLUDED_ -#if (defined(_MSC_VER) && _MSC_VER < 1900 /*vs2015*/) || defined MINGW_HAS_SECURE_API +#if (defined(_MSC_VER) && _MSC_VER < 1900 /*vs2015*/) // || defined MINGW_HAS_SECURE_API #include #define snprintf sprintf_s #define safe_vsprintf(buf,max,format,args) vsnprintf_s((buf), (max), (max), (format), (args)) diff --git a/3rdparty/tinyexr/tinyexr.cc b/3rdparty/tinyexr/tinyexr.cc deleted file mode 100644 index 969a6d505..000000000 --- a/3rdparty/tinyexr/tinyexr.cc +++ /dev/null @@ -1,2 +0,0 @@ -#define TINYEXR_IMPLEMENTATION -#include "tinyexr.h" diff --git a/examples/common/bgfx_utils.cpp b/examples/common/bgfx_utils.cpp index 81dd3f74f..9af79b10f 100644 --- a/examples/common/bgfx_utils.cpp +++ b/examples/common/bgfx_utils.cpp @@ -23,6 +23,7 @@ namespace stl = tinystl; BX_PRAGMA_DIAGNOSTIC_PUSH() BX_PRAGMA_DIAGNOSTIC_IGNORED_CLANG_GCC("-Wtype-limits") +#define MINIZ_NO_STDIO #define TINYEXR_IMPLEMENTATION #include BX_PRAGMA_DIAGNOSTIC_POP() diff --git a/makefile b/makefile index 528438992..4ee32e834 100644 --- a/makefile +++ b/makefile @@ -340,6 +340,9 @@ texturev: .build/projects/$(BUILD_PROJECT_DIR) ## Build texturev tool. tools: geometryc shaderc texturec texturev ## Build tools. +clean-tools: ## Clean tools projects. + -$(SILENT) rm -r .build/projects/$(BUILD_PROJECT_DIR) + dist-windows: .build/projects/gmake-mingw-gcc $(SILENT) $(MAKE) -C .build/projects/gmake-mingw-gcc config=release64 -j 6 geometryc $(SILENT) cp .build/win64_mingw-gcc/bin/geometrycRelease.exe tools/bin/windows/geometryc.exe diff --git a/scripts/texturec.lua b/scripts/texturec.lua index 36a01b15f..28271bba2 100644 --- a/scripts/texturec.lua +++ b/scripts/texturec.lua @@ -30,7 +30,6 @@ project "texturec" path.join(BGFX_DIR, "3rdparty/nvtt/**.h"), path.join(BGFX_DIR, "3rdparty/pvrtc/**.cpp"), path.join(BGFX_DIR, "3rdparty/pvrtc/**.h"), - path.join(BGFX_DIR, "3rdparty/tinyexr/**.cc"), path.join(BGFX_DIR, "3rdparty/tinyexr/**.h"), path.join(BGFX_DIR, "3rdparty/iqa/include/**.h"), path.join(BGFX_DIR, "3rdparty/iqa/source/**.c"), diff --git a/tools/texturec/texturec.cpp b/tools/texturec/texturec.cpp index e950ab828..3e146cdd6 100644 --- a/tools/texturec/texturec.cpp +++ b/tools/texturec/texturec.cpp @@ -16,7 +16,7 @@ #include #include #include -#include + #include extern "C" { @@ -57,6 +57,13 @@ BX_PRAGMA_DIAGNOSTIC_IGNORED_CLANG_GCC("-Wint-to-pointer-cast") #include BX_PRAGMA_DIAGNOSTIC_POP(); +BX_PRAGMA_DIAGNOSTIC_PUSH() +BX_PRAGMA_DIAGNOSTIC_IGNORED_CLANG_GCC("-Wtype-limits") +#define MINIZ_NO_STDIO +#define TINYEXR_IMPLEMENTATION +#include +BX_PRAGMA_DIAGNOSTIC_POP() + #if 0 # define BX_TRACE(_format, ...) fprintf(stderr, "" _format "\n", ##__VA_ARGS__) #endif // DEBUG