Bug 579781 yyerror should be const in nsVCard.cpp warning: deprecated conversion from string constant to 'char*'
authortimeless@mozdev.org
Mon, 19 Jul 2010 00:23:03 +0300
changeset 6065 bbc1f808ff9d3183ea4205ac4e109a28e6e15b36
parent 6064 4a250eaee18f478dda66557491fc96e6856b5a4e
child 6066 740567ce49c7d7c6484136380568825ce0b250d1
push idunknown
push userunknown
push dateunknown
bugs579781
Bug 579781 yyerror should be const in nsVCard.cpp warning: deprecated conversion from string constant to 'char*' r=bienvenu
mailnews/addrbook/src/nsVCard.cpp
--- a/mailnews/addrbook/src/nsVCard.cpp
+++ b/mailnews/addrbook/src/nsVCard.cpp
@@ -174,17 +174,17 @@ static VObject* ObjStack[PR_MAXLEVEL];
 static int ObjStackTop;
 
 
 /* A helpful utility for the rest of the app. */
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-    extern void yyerror(char *s);
+    extern void yyerror(const char *s);
 	  extern char** fieldedProp;
 
 #ifdef __cplusplus
     }
 #endif
 
 int yyparse();
 
@@ -1233,17 +1233,17 @@ VObject* parse_MIME(const char *input, u
 
 static MimeErrorHandler mimeErrorHandler;
 
 void registerMimeErrorHandler(MimeErrorHandler me)
     {
     mimeErrorHandler = me;
     }
 
-void mime_error(char *s)
+void mime_error(const char *s)
 {
   char msg[256];
   if (mimeErrorHandler) {
     PR_snprintf(msg, sizeof(msg), "%s at line %d", s, mime_lineNum);
     mimeErrorHandler(msg);
   }
 }