Subject: | [PATCH] Quiet some warinings in XML-LibXML |
The patch below quiets some warnings in Perls compiles with gcc's using -Wwrite-strings.
[steve@kirk XML-LibXML-1.65-ohHi8S]$ diff -u LibXML.xs.old LibXML.xs
--- LibXML.xs.old 2007-12-26 19:28:02.000000000 -0600
+++ LibXML.xs 2007-12-26 19:40:28.000000000 -0600
@@ -1272,7 +1272,7 @@
xmlInitializeCatalog(); /* use catalog data */
#endif
-char *
+const char *
LIBXML_DOTTED_VERSION()
CODE:
RETVAL = LIBXML_DOTTED_VERSION;
@@ -1763,7 +1763,7 @@
STRLEN len;
char * ptr;
char* URL = NULL;
- char * encoding = NULL;
+ const char * encoding = NULL;
SV * saved_error = sv_2mortal(newSVpv("",0));
HV * real_obj;
htmlDocPtr real_doc;
@@ -1968,7 +1968,7 @@
SV * enc
PREINIT:
STRLEN len;
- char * encoding = "UTF-8";
+ const char * encoding = "UTF-8";
SV * saved_error = sv_2mortal(newSVpv("",0));
HV * real_obj;
int recover = 0;
@@ -2039,7 +2039,7 @@
PREINIT:
STRLEN len;
char * ptr;
- char * encoding = "UTF-8";
+ const char * encoding = "UTF-8";
SV * saved_error = sv_2mortal(newSVpv("",0));
HV * real_obj;
int recover = 0;