Commit a897542f by Scott Graham Committed by Jamie Madill

vs2015: disable warning in generated code, fix another

Macro redefinition is for INT8_MIN, etc. which are generated by flex. VS doesn't define __STDC_VERSION__ as >= C99 because it's still only partial support in VS2015. Fix a float->int conversion narrowing warning. Change-Id: I5232eb23426eaf584218137c068e14d74119a1ef Reviewed-on: https://chromium-review.googlesource.com/268821Reviewed-by: 's avatarZhenyao Mo <zmo@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Tested-by: 's avatarScott Graham <scottmg@chromium.org>
parent fc692934
......@@ -540,6 +540,10 @@ http://msdn.microsoft.com/en-us/library/2scxys89.aspx
IF YOU MODIFY THIS FILE YOU ALSO NEED TO RUN generate_parser.sh.
*/
#if defined(_MSC_VER)
#pragma warning(disable: 4005)
#endif
#include "Tokenizer.h"
#include "DiagnosticsBase.h"
......
......@@ -23,6 +23,10 @@ IF YOU MODIFY THIS FILE YOU ALSO NEED TO RUN generate_parser.sh.
}
%{
#if defined(_MSC_VER)
#pragma warning(disable: 4005)
#endif
#include "Tokenizer.h"
#include "DiagnosticsBase.h"
......
......@@ -286,7 +286,7 @@ EGLint SwapChain9::swapRect(EGLint x, EGLint y, EGLint width, EGLint height)
device->SetStreamSourceFreq(streamIndex, 1);
}
D3DVIEWPORT9 viewport = {0, 0, mWidth, mHeight, 0.0f, 1.0f};
D3DVIEWPORT9 viewport = {0, 0, static_cast<DWORD>(mWidth), static_cast<DWORD>(mHeight), 0.0f, 1.0f};
device->SetViewport(&viewport);
float x1 = x - 0.5f;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment