Fix some warnings caused by treating string literals as non-const.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666368 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/compiler/cpp/src/main.cc b/compiler/cpp/src/main.cc
index efee937..acb27a8 100644
--- a/compiler/cpp/src/main.cc
+++ b/compiler/cpp/src/main.cc
@@ -189,7 +189,7 @@
  *
  * @param fmt C format string followed by additional arguments
  */
-void yyerror(char* fmt, ...) {
+void yyerror(const char* fmt, ...) {
   va_list args;
   fprintf(stderr,
           "[ERROR:%s:%d] (last token was '%s')\n",
@@ -209,7 +209,7 @@
  *
  * @param fmt C format string followed by additional arguments
  */
-void pdebug(char* fmt, ...) {
+void pdebug(const char* fmt, ...) {
   if (g_debug == 0) {
     return;
   }
@@ -226,7 +226,7 @@
  *
  * @param fmt C format string followed by additional arguments
  */
-void pverbose(char* fmt, ...) {
+void pverbose(const char* fmt, ...) {
   if (g_verbose == 0) {
     return;
   }
@@ -241,7 +241,7 @@
  *
  * @param fmt C format string followed by additional arguments
  */
-void pwarning(int level, char* fmt, ...) {
+void pwarning(int level, const char* fmt, ...) {
   if (g_warn < level) {
     return;
   }
diff --git a/compiler/cpp/src/main.h b/compiler/cpp/src/main.h
index 3ab2744..eb355f0 100644
--- a/compiler/cpp/src/main.h
+++ b/compiler/cpp/src/main.h
@@ -22,17 +22,17 @@
 /**
  * Expected to be defined by Flex/Bison
  */
-void yyerror(char* fmt, ...);
+void yyerror(const char* fmt, ...);
 
 /**
  * Parse debugging output, used to print helpful info
  */
-void pdebug(char* fmt, ...);
+void pdebug(const char* fmt, ...);
 
 /**
  * Parser warning
  */
-void pwarning(int level, char* fmt, ...);
+void pwarning(int level, const char* fmt, ...);
 
 /**
  * Failure!