From aeb414d238447ff2cb1cfe889ad6522069d5fb5c Mon Sep 17 00:00:00 2001 From: bkaradzic Date: Tue, 21 May 2013 21:58:24 -0700 Subject: [PATCH] Fixed 64-bit warnings. --- 3rdparty/freetype/freetype.h | 12 +++++++----- examples/12-lod/lod.cpp | 2 +- examples/common/font/text_buffer_manager.cpp | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/3rdparty/freetype/freetype.h b/3rdparty/freetype/freetype.h index d71cd8068..5ffa0ffb0 100644 --- a/3rdparty/freetype/freetype.h +++ b/3rdparty/freetype/freetype.h @@ -1,11 +1,13 @@ #pragma once #if defined(_MSC_VER) -# pragma warning(push) -# pragma warning(disable: 4100) // DISABLE warning C4100: '' : unreferenced formal parameter -# pragma warning(disable: 4146) // DISABLE warning C4146: unary minus operator applied to unsigned type, result still unsigned -# pragma warning(disable: 4700) // DISABLE warning C4700: uninitialized local variable 'temp' used -# pragma warning(disable: 4701) // DISABLE warning C4701: potentially uninitialized local variable '' used +# pragma warning(push) +# pragma warning(disable: 4100) // DISABLE warning C4100: '' : unreferenced formal parameter +# pragma warning(disable: 4146) // DISABLE warning C4146: unary minus operator applied to unsigned type, result still unsigned +# pragma warning(disable: 4244) // DISABLE warning C4244: '+=' : conversion from '__int64' to 'FT_ULong', possible loss of data +# pragma warning(disable: 4267) // DISABLE warning C4267: 'initializing' : conversion from 'size_t' to 'FT_Long', possible loss of data +# pragma warning(disable: 4700) // DISABLE warning C4700: uninitialized local variable 'temp' used +# pragma warning(disable: 4701) // DISABLE warning C4701: potentially uninitialized local variable '' used #elif defined(__GNUC__) # pragma GCC system_header #endif // defined(__GNUC__) diff --git a/examples/12-lod/lod.cpp b/examples/12-lod/lod.cpp index 76455737a..44ba41691 100644 --- a/examples/12-lod/lod.cpp +++ b/examples/12-lod/lod.cpp @@ -522,7 +522,7 @@ int _main_(int /*_argc*/, char** /*_argv*/) } } - if (currLOD!=targetLOD) + if (currLOD != targetLOD) { transitionFrame++; } diff --git a/examples/common/font/text_buffer_manager.cpp b/examples/common/font/text_buffer_manager.cpp index 985ec4f23..e9a7d37c3 100644 --- a/examples/common/font/text_buffer_manager.cpp +++ b/examples/common/font/text_buffer_manager.cpp @@ -267,7 +267,7 @@ void TextBuffer::appendText(FontHandle _fontHandle, const wchar_t* _string) m_lineGap = 0; } - for (uint32_t ii = 0, end = wcslen(_string); ii < end; ++ii) + for (uint32_t ii = 0, end = (uint32_t)wcslen(_string); ii < end; ++ii) { uint32_t _codePoint = _string[ii]; if (m_fontManager->getGlyphInfo(_fontHandle, _codePoint, glyph) )