glsl: Disable MSVC switch warning on a per-file basis.

This addresses

  ...\glsl_parser.cpp(...) : warning C4065: switch statement contains 'default' but no 'case' labels

This is on code generated by bison, which we have little control.

It seems useful to have this warning otherwise enabled.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
This commit is contained in:
Jose Fonseca 2015-03-19 22:24:20 +00:00
parent d01a7cdae5
commit fb78cccd7b

View file

@ -34,6 +34,10 @@
#include "glsl_types.h"
#include "main/context.h"
#ifdef _MSC_VER
#pragma warning( disable : 4065 ) // switch statement contains 'default' but no 'case' labels
#endif
#undef yyerror
static void yyerror(YYLTYPE *loc, _mesa_glsl_parse_state *st, const char *msg)