Fix build warnings on some platforms
authorDaniel Koch <dkoch@nvidia.com>
Tue, 28 Feb 2017 14:01:43 +0000 (09:01 -0500)
committerDaniel Koch <dkoch@nvidia.com>
Wed, 1 Mar 2017 14:50:42 +0000 (09:50 -0500)
commit197082ca34639ffb98d49ac48ae388df959d779e
treec9bf1a047bae64fa39de68d689068b34a5462c9c
parent3494d71cfa831eb57a69149b3092152d5c7743dc
Fix build warnings on some platforms

Use an explicit cast from size_t to int to avoid errors like the following:
glslang\glslang\MachineIndependent\preprocessor\Pp.cpp(1053) : error C2220: warning treated as error - no 'object' file generated
glslang\glslang\MachineIndependent\preprocessor\Pp.cpp(1053) : warning C4267: '=' : conversion from 'size_t' to 'int', possible loss of data

affects Pp.cpp, hlslParseHelper.cpp.

Initialize local variable to get rid of warningsa about potentially
uninitialized variables:
glslang\hlsl\hlslparsehelper.cpp(3667) : error C2220: warning treated as error - no 'object' file generated
glslang\hlsl\hlslparsehelper.cpp(3667) : warning C4701: potentially uninitialized local variable 'builtIn' used

affects hlslParseHelper.cpp
glslang/MachineIndependent/preprocessor/Pp.cpp
hlsl/hlslParseHelper.cpp