Commit f3c92311 by apatrick@chromium.org

Fix remaining compiler warnings in translator_common.

One MSVC warning and one GCC warning. I also added a variable to build_angle.gyp that will enforce various rules not normally applied to third party software when built as part of chromium. Review URL: https://codereview.appspot.com/5570061 git-svn-id: https://angleproject.googlecode.com/svn/trunk@962 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent e0f059c5
...@@ -3,6 +3,9 @@ ...@@ -3,6 +3,9 @@
# found in the LICENSE file. # found in the LICENSE file.
{ {
'variables': {
'chromium_code': 1,
},
'target_defaults': { 'target_defaults': {
'defines': [ 'defines': [
'ANGLE_DISABLE_TRACE', 'ANGLE_DISABLE_TRACE',
...@@ -13,9 +16,6 @@ ...@@ -13,9 +16,6 @@
{ {
'target_name': 'translator_common', 'target_name': 'translator_common',
'type': 'static_library', 'type': 'static_library',
'variables': {
'warn_as_error': 0,
},
'include_dirs': [ 'include_dirs': [
'.', '.',
'../include', '../include',
......
#define MAJOR_VERSION 1 #define MAJOR_VERSION 1
#define MINOR_VERSION 0 #define MINOR_VERSION 0
#define BUILD_VERSION 0 #define BUILD_VERSION 0
#define BUILD_REVISION 961 #define BUILD_REVISION 962
#define STRINGIFY(x) #x #define STRINGIFY(x) #x
#define MACRO_STRINGIFY(x) STRINGIFY(x) #define MACRO_STRINGIFY(x) STRINGIFY(x)
......
...@@ -482,6 +482,8 @@ void updateExtensionBehavior(const char* extName, const char* behavior) ...@@ -482,6 +482,8 @@ void updateExtensionBehavior(const char* extName, const char* behavior)
msg = TString("extension '") + extName + "' is not supported"; msg = TString("extension '") + extName + "' is not supported";
context->infoSink.info.message(EPrefixWarning, msg.c_str(), yylineno); context->infoSink.info.message(EPrefixWarning, msg.c_str(), yylineno);
break; break;
default:
break;
} }
return; return;
} else } else
......
...@@ -3130,6 +3130,8 @@ void updateExtensionBehavior(const char* extName, const char* behavior) ...@@ -3130,6 +3130,8 @@ void updateExtensionBehavior(const char* extName, const char* behavior)
msg = TString("extension '") + extName + "' is not supported"; msg = TString("extension '") + extName + "' is not supported";
context->infoSink.info.message(EPrefixWarning, msg.c_str(), yylineno); context->infoSink.info.message(EPrefixWarning, msg.c_str(), yylineno);
break; break;
default:
break;
} }
return; return;
} else } else
......
...@@ -1726,12 +1726,8 @@ yydestruct (yymsg, yytype, yyvaluep, context) ...@@ -1726,12 +1726,8 @@ yydestruct (yymsg, yytype, yyvaluep, context)
yymsg = "Deleting"; yymsg = "Deleting";
YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
switch (yytype) // Delete any automatically generated switch with no cases code that appears
{ // here. It will produce a warning (and therefore an error) in MSVC.
default:
break;
}
} }
/* Prevent warnings from -Wmissing-prototypes. */ /* Prevent warnings from -Wmissing-prototypes. */
......
...@@ -53,6 +53,7 @@ ...@@ -53,6 +53,7 @@
WarningLevel="3" WarningLevel="3"
Detect64BitPortabilityProblems="false" Detect64BitPortabilityProblems="false"
DebugInformationFormat="4" DebugInformationFormat="4"
WarnAsError="true"
/> />
<Tool <Tool
Name="VCManagedResourceCompilerTool" Name="VCManagedResourceCompilerTool"
...@@ -116,6 +117,7 @@ ...@@ -116,6 +117,7 @@
WarningLevel="3" WarningLevel="3"
Detect64BitPortabilityProblems="false" Detect64BitPortabilityProblems="false"
DebugInformationFormat="3" DebugInformationFormat="3"
WarnAsError="true"
/> />
<Tool <Tool
Name="VCManagedResourceCompilerTool" Name="VCManagedResourceCompilerTool"
...@@ -180,6 +182,7 @@ ...@@ -180,6 +182,7 @@
WarningLevel="3" WarningLevel="3"
Detect64BitPortabilityProblems="false" Detect64BitPortabilityProblems="false"
DebugInformationFormat="3" DebugInformationFormat="3"
WarnAsError="true"
/> />
<Tool <Tool
Name="VCManagedResourceCompilerTool" Name="VCManagedResourceCompilerTool"
...@@ -244,6 +247,7 @@ ...@@ -244,6 +247,7 @@
WarningLevel="3" WarningLevel="3"
Detect64BitPortabilityProblems="false" Detect64BitPortabilityProblems="false"
DebugInformationFormat="3" DebugInformationFormat="3"
WarnAsError="true"
/> />
<Tool <Tool
Name="VCManagedResourceCompilerTool" Name="VCManagedResourceCompilerTool"
......
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