Commit e057c5dd by apatrick@chromium.org

Fixed more warnings.

Clang warns about missing case in enum glslang_lex.cpp so I disabled that one as well. MSVC, as Chromium is built at least, warns about things in its own STL headers in SymbolTable.cpp so disabled the warning for that file. esTransform.c had a struct that the compiler could not determine was initialized so I explicitly initialized it. Review URL: https://codereview.appspot.com/5577048 git-svn-id: https://angleproject.googlecode.com/svn/trunk@965 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent a1d8059d
......@@ -50,7 +50,7 @@
],
'RuntimeTypeInfo': 'false',
'WarningLevel': '4',
'DisableSpecificWarnings': '4100;4127;4189;4239;4244;4245;4389;4512;4702;4718',
'DisableSpecificWarnings': '4100;4127;4189;4239;4244;4245;4389;4512;4702',
},
'VCLinkerTool': {
'FixedBaseAddress': '1',
......
......@@ -171,7 +171,7 @@ esOrtho(ESMatrix *result, float left, float right, float bottom, float top, floa
void ESUTIL_API
esMatrixMultiply(ESMatrix *result, ESMatrix *srcA, ESMatrix *srcB)
{
ESMatrix tmp;
ESMatrix tmp = { 0.0f };
int i;
for (i=0; i<4; i++)
......
#define MAJOR_VERSION 1
#define MINOR_VERSION 0
#define BUILD_VERSION 0
#define BUILD_REVISION 964
#define BUILD_REVISION 965
#define STRINGIFY(x) #x
#define MACRO_STRINGIFY(x) STRINGIFY(x)
......
......@@ -9,6 +9,10 @@
// are documented in the header file.
//
#if defined(_MSC_VER)
#pragma warning(disable: 4718)
#endif
#include "compiler/SymbolTable.h"
#include <stdio.h>
......
......@@ -26,6 +26,7 @@ WHICH GENERATES THE GLSL ES LEXER (glslang_lex.cpp).
#if defined(__GNUC__)
#pragma GCC diagnostic ignored "-Wunused-function"
#pragma GCC diagnostic ignored "-Wunused-variable"
#pragma GCC diagnostic ignored "-Wswitch-enum"
#elif defined(_MSC_VER)
#pragma warning(disable: 4065)
#pragma warning(disable: 4189)
......
......@@ -26,6 +26,7 @@ WHICH GENERATES THE GLSL ES PARSER (glslang_tab.cpp AND glslang_tab.h).
#if defined(__GNUC__)
#pragma GCC diagnostic ignored "-Wunused-function"
#pragma GCC diagnostic ignored "-Wunused-variable"
#pragma GCC diagnostic ignored "-Wswitch-enum"
#elif defined(_MSC_VER)
#pragma warning(disable: 4065)
#pragma warning(disable: 4189)
......
......@@ -11,6 +11,7 @@
#if defined(__GNUC__)
#pragma GCC diagnostic ignored "-Wunused-function"
#pragma GCC diagnostic ignored "-Wunused-variable"
#pragma GCC diagnostic ignored "-Wswitch-enum"
#elif defined(_MSC_VER)
#pragma warning(disable: 4065)
#pragma warning(disable: 4189)
......@@ -20,7 +21,7 @@
#line 24 "./glslang_lex.cpp"
#line 25 "./glslang_lex.cpp"
#define YY_INT_ALIGNED short int
......
......@@ -274,6 +274,7 @@
#if defined(__GNUC__)
#pragma GCC diagnostic ignored "-Wunused-function"
#pragma GCC diagnostic ignored "-Wunused-variable"
#pragma GCC diagnostic ignored "-Wswitch-enum"
#elif defined(_MSC_VER)
#pragma warning(disable: 4065)
#pragma warning(disable: 4189)
......@@ -746,26 +747,26 @@ static const yytype_int16 yyrhs[] =
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
0, 164, 164, 199, 202, 215, 220, 225, 231, 234,
307, 310, 419, 429, 442, 450, 549, 552, 560, 564,
571, 575, 582, 588, 597, 605, 660, 667, 677, 680,
690, 700, 721, 722, 723, 728, 729, 738, 750, 751,
759, 770, 774, 775, 785, 795, 805, 818, 819, 829,
842, 846, 850, 854, 855, 868, 869, 882, 883, 896,
897, 914, 915, 928, 929, 930, 931, 932, 936, 939,
950, 958, 983, 988, 995, 1031, 1034, 1041, 1049, 1070,
1089, 1100, 1129, 1134, 1144, 1149, 1159, 1162, 1165, 1168,
1174, 1181, 1184, 1200, 1218, 1242, 1265, 1269, 1287, 1295,
1327, 1347, 1423, 1432, 1455, 1458, 1464, 1472, 1480, 1488,
1498, 1505, 1508, 1511, 1517, 1520, 1535, 1539, 1543, 1547,
1556, 1561, 1566, 1571, 1576, 1581, 1586, 1591, 1596, 1601,
1607, 1613, 1619, 1624, 1629, 1638, 1647, 1652, 1665, 1665,
1679, 1679, 1688, 1691, 1706, 1742, 1746, 1752, 1760, 1776,
1780, 1784, 1785, 1791, 1792, 1793, 1794, 1795, 1799, 1800,
1800, 1800, 1810, 1811, 1816, 1819, 1829, 1832, 1838, 1839,
1843, 1851, 1855, 1865, 1870, 1887, 1887, 1892, 1892, 1899,
1899, 1907, 1910, 1916, 1919, 1925, 1929, 1936, 1943, 1950,
1957, 1968, 1977, 1981, 1988, 1991, 1997, 1997
0, 165, 165, 200, 203, 216, 221, 226, 232, 235,
308, 311, 420, 430, 443, 451, 550, 553, 561, 565,
572, 576, 583, 589, 598, 606, 661, 668, 678, 681,
691, 701, 722, 723, 724, 729, 730, 739, 751, 752,
760, 771, 775, 776, 786, 796, 806, 819, 820, 830,
843, 847, 851, 855, 856, 869, 870, 883, 884, 897,
898, 915, 916, 929, 930, 931, 932, 933, 937, 940,
951, 959, 984, 989, 996, 1032, 1035, 1042, 1050, 1071,
1090, 1101, 1130, 1135, 1145, 1150, 1160, 1163, 1166, 1169,
1175, 1182, 1185, 1201, 1219, 1243, 1266, 1270, 1288, 1296,
1328, 1348, 1424, 1433, 1456, 1459, 1465, 1473, 1481, 1489,
1499, 1506, 1509, 1512, 1518, 1521, 1536, 1540, 1544, 1548,
1557, 1562, 1567, 1572, 1577, 1582, 1587, 1592, 1597, 1602,
1608, 1614, 1620, 1625, 1630, 1639, 1648, 1653, 1666, 1666,
1680, 1680, 1689, 1692, 1707, 1743, 1747, 1753, 1761, 1777,
1781, 1785, 1786, 1792, 1793, 1794, 1795, 1796, 1800, 1801,
1801, 1801, 1811, 1812, 1817, 1820, 1830, 1833, 1839, 1840,
1844, 1852, 1856, 1866, 1871, 1888, 1888, 1893, 1893, 1900,
1900, 1908, 1911, 1917, 1920, 1926, 1930, 1937, 1944, 1951,
1958, 1969, 1978, 1982, 1989, 1992, 1998, 1998
};
#endif
......
......@@ -51,7 +51,7 @@
RuntimeLibrary="1"
UsePrecompiledHeader="0"
WarningLevel="4"
DisableSpecificWarnings="4100;4127;4189;4239;4244;4245;4389;4512;4702;4718"
DisableSpecificWarnings="4100;4127;4189;4239;4244;4245;4389;4512;4702"
DebugInformationFormat="4"
WarnAsError="true"
/>
......@@ -117,7 +117,7 @@
EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0"
WarningLevel="4"
DisableSpecificWarnings="4100;4127;4189;4239;4244;4245;4389;4512;4702;4718"
DisableSpecificWarnings="4100;4127;4189;4239;4244;4245;4389;4512;4702"
DebugInformationFormat="3"
WarnAsError="true"
/>
......@@ -182,7 +182,7 @@
RuntimeLibrary="1"
UsePrecompiledHeader="0"
WarningLevel="4"
DisableSpecificWarnings="4100;4127;4189;4239;4244;4245;4389;4512;4702;4718"
DisableSpecificWarnings="4100;4127;4189;4239;4244;4245;4389;4512;4702"
DebugInformationFormat="3"
WarnAsError="true"
/>
......@@ -249,7 +249,7 @@
EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0"
WarningLevel="4"
DisableSpecificWarnings="4100;4127;4189;4239;4244;4245;4389;4512;4702;4718"
DisableSpecificWarnings="4100;4127;4189;4239;4244;4245;4389;4512;4702"
DebugInformationFormat="3"
WarnAsError="true"
/>
......
......@@ -51,7 +51,7 @@
RuntimeLibrary="1"
UsePrecompiledHeader="0"
WarningLevel="4"
DisableSpecificWarnings="4100;4127;4189;4239;4244;4245;4389;4512;4702;4718"
DisableSpecificWarnings="4100;4127;4189;4239;4244;4245;4389;4512;4702"
Detect64BitPortabilityProblems="false"
DebugInformationFormat="4"
WarnAsError="true"
......@@ -132,7 +132,7 @@
RuntimeLibrary="0"
UsePrecompiledHeader="0"
WarningLevel="4"
DisableSpecificWarnings="4100;4127;4189;4239;4244;4245;4389;4512;4702;4718"
DisableSpecificWarnings="4100;4127;4189;4239;4244;4245;4389;4512;4702"
Detect64BitPortabilityProblems="false"
DebugInformationFormat="3"
WarnAsError="true"
......@@ -216,7 +216,7 @@
RuntimeLibrary="1"
UsePrecompiledHeader="0"
WarningLevel="4"
DisableSpecificWarnings="4100;4127;4189;4239;4244;4245;4389;4512;4702;4718"
DisableSpecificWarnings="4100;4127;4189;4239;4244;4245;4389;4512;4702"
Detect64BitPortabilityProblems="false"
DebugInformationFormat="3"
WarnAsError="true"
......@@ -298,7 +298,7 @@
RuntimeLibrary="0"
UsePrecompiledHeader="0"
WarningLevel="4"
DisableSpecificWarnings="4100;4127;4189;4239;4244;4245;4389;4512;4702;4718"
DisableSpecificWarnings="4100;4127;4189;4239;4244;4245;4389;4512;4702"
Detect64BitPortabilityProblems="false"
DebugInformationFormat="3"
WarnAsError="true"
......
......@@ -1902,7 +1902,7 @@ bool Program::defineUniform(const D3DXHANDLE &constantHandle, const D3DXCONSTANT
}
}
bool Program::defineUniform(const D3DXCONSTANT_DESC &constantDescription, std::string &_name)
bool Program::defineUniform(const D3DXCONSTANT_DESC &constantDescription, const std::string &_name)
{
Uniform *uniform = createUniform(constantDescription, _name);
......@@ -1943,7 +1943,7 @@ bool Program::defineUniform(const D3DXCONSTANT_DESC &constantDescription, std::s
return true;
}
Uniform *Program::createUniform(const D3DXCONSTANT_DESC &constantDescription, std::string &_name)
Uniform *Program::createUniform(const D3DXCONSTANT_DESC &constantDescription, const std::string &_name)
{
if (constantDescription.Rows == 1) // Vectors and scalars
{
......
......@@ -154,8 +154,8 @@ class Program
bool linkUniforms(ID3DXConstantTable *constantTable);
bool defineUniform(const D3DXHANDLE &constantHandle, const D3DXCONSTANT_DESC &constantDescription, std::string name = "");
bool defineUniform(const D3DXCONSTANT_DESC &constantDescription, std::string &name);
Uniform *createUniform(const D3DXCONSTANT_DESC &constantDescription, std::string &name);
bool defineUniform(const D3DXCONSTANT_DESC &constantDescription, const std::string &name);
Uniform *createUniform(const D3DXCONSTANT_DESC &constantDescription, const std::string &name);
bool applyUniformnfv(Uniform *targetUniform, const GLfloat *v);
bool applyUniform1iv(Uniform *targetUniform, GLsizei count, const GLint *v);
bool applyUniform2iv(Uniform *targetUniform, GLsizei count, const GLint *v);
......
......@@ -4932,7 +4932,7 @@ void __stdcall glTexImage2D(GLenum target, GLint level, GLint internalformat, GL
return error(GL_INVALID_VALUE);
}
if (internalformat != format)
if (internalformat != GLint(format))
{
return error(GL_INVALID_OPERATION);
}
......
......@@ -51,7 +51,7 @@
RuntimeLibrary="1"
UsePrecompiledHeader="0"
WarningLevel="4"
DisableSpecificWarnings="4100;4127;4189;4239;4244;4245;4389;4512;4702;4718"
DisableSpecificWarnings="4100;4127;4189;4239;4244;4245;4389;4512;4702"
Detect64BitPortabilityProblems="false"
DebugInformationFormat="4"
WarnAsError="true"
......
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