Author: clavoie
Date: Sun Nov  7 19:42:48 2010
New Revision: 1032365

URL: http://svn.apache.org/viewvc?rev=1032365&view=rev
Log:
THRIFT-916: Fix warnings in C++ when compiling with -Wall. In this case, in the 
flex output, in the new c_glib generator and an actual bug in the parser that 
couldn't actually trigger.

Modified:
    thrift/trunk/compiler/cpp/src/generate/t_c_glib_generator.cc
    thrift/trunk/compiler/cpp/src/parse/t_base_type.h
    thrift/trunk/compiler/cpp/src/thriftl.ll

Modified: thrift/trunk/compiler/cpp/src/generate/t_c_glib_generator.cc
URL: 
http://svn.apache.org/viewvc/thrift/trunk/compiler/cpp/src/generate/t_c_glib_generator.cc?rev=1032365&r1=1032364&r2=1032365&view=diff
==============================================================================
--- thrift/trunk/compiler/cpp/src/generate/t_c_glib_generator.cc (original)
+++ thrift/trunk/compiler/cpp/src/generate/t_c_glib_generator.cc Sun Nov  7 
19:42:48 2010
@@ -2981,6 +2981,4 @@ initial_caps_to_underscores (string name
 }
 
 /* register this generator with the main program */
-THRIFT_REGISTER_GENERATOR(c_glib, "C, using GLib", "");
-
-
+THRIFT_REGISTER_GENERATOR(c_glib, "C, using GLib", "")

Modified: thrift/trunk/compiler/cpp/src/parse/t_base_type.h
URL: 
http://svn.apache.org/viewvc/thrift/trunk/compiler/cpp/src/parse/t_base_type.h?rev=1032365&r1=1032364&r2=1032365&view=diff
==============================================================================
--- thrift/trunk/compiler/cpp/src/parse/t_base_type.h (original)
+++ thrift/trunk/compiler/cpp/src/parse/t_base_type.h Sun Nov  7 19:42:48 2010
@@ -84,7 +84,7 @@ class t_base_type : public t_type {
   }
 
   void set_string_enum(bool val) {
-    string_enum_ = true;
+    string_enum_ = val;
   }
 
   bool is_string_enum() const {

Modified: thrift/trunk/compiler/cpp/src/thriftl.ll
URL: 
http://svn.apache.org/viewvc/thrift/trunk/compiler/cpp/src/thriftl.ll?rev=1032365&r1=1032364&r2=1032365&view=diff
==============================================================================
--- thrift/trunk/compiler/cpp/src/thriftl.ll (original)
+++ thrift/trunk/compiler/cpp/src/thriftl.ll Sun Nov  7 19:42:48 2010
@@ -61,6 +61,11 @@ void integer_overflow(char* text) {
 %option noyywrap
 
 /**
+ * We don't use it, and it fires up warnings at -Wall
+ */
+%option nounput
+
+/**
  * Helper definitions, comments, constants, and whatnot
  */
 


Reply via email to