libsoup.gcc-warn.awn.1.patch
- From: "Andrew W. Nosenko" <andrew w nosenko gmail com>
- To: libsoup-list gnome org
- Subject: libsoup.gcc-warn.awn.1.patch
- Date: Wed, 13 Sep 2006 18:57:33 +0300
Make GCC happy: remove some, but not all :-(, GCC warnings like
"cast discards qualifiers from pointer target type",
"initialization discards qualifiers from pointer target type",
"initialization makes integer from pointer without a cast".
--
Andrew W. Nosenko <andrew w nosenko gmail com>
Make GCC happy: remove some, but not all :-(, GCC warnings like
"cast discards qualifiers from pointer target type",
"initialization discards qualifiers from pointer target type",
"initialization makes integer from pointer without a cast".
Index: libsoup/soup-auth-digest.c
===================================================================
RCS file: /cvs/gnome/libsoup/libsoup/soup-auth-digest.c,v
retrieving revision 1.12
diff -u -p -r1.12 soup-auth-digest.c
--- libsoup/soup-auth-digest.c 10 Apr 2006 18:09:01 -0000 1.12
+++ libsoup/soup-auth-digest.c 13 Sep 2006 15:46:56 -0000
@@ -104,20 +104,20 @@ soup_auth_digest_class_init (SoupAuthDig
}
typedef struct {
- char *name;
+ const char *name;
guint type;
} DataType;
static DataType qop_types[] = {
{ "auth", QOP_AUTH },
{ "auth-int", QOP_AUTH_INT },
- { NULL, NULL }
+ { NULL, 0 }
};
static DataType algorithm_types[] = {
{ "MD5", ALGORITHM_MD5 },
{ "MD5-sess", ALGORITHM_MD5_SESS },
- { NULL, NULL }
+ { NULL, 0 }
};
static guint
Index: libsoup/soup-connection-ntlm.c
===================================================================
RCS file: /cvs/gnome/libsoup/libsoup/soup-connection-ntlm.c,v
retrieving revision 1.11
diff -u -p -r1.11 soup-connection-ntlm.c
--- libsoup/soup-connection-ntlm.c 27 Oct 2005 14:00:03 -0000 1.11
+++ libsoup/soup-connection-ntlm.c 13 Sep 2006 15:46:56 -0000
@@ -340,7 +340,7 @@ soup_ntlm_parse_challenge (const char *c
chall = g_malloc (decodelen);
state = save = 0;
- clen = soup_base64_decode_step ((guchar *) challenge + 5,
+ clen = soup_base64_decode_step ((const guchar *) challenge + 5,
decodelen,
chall,
&state,
@@ -421,19 +421,19 @@ soup_ntlm_response (const char *nonce,
p,
&state,
&save);
- p += soup_base64_encode_step ((guchar *) domain,
+ p += soup_base64_encode_step ((const guchar *) domain,
dlen,
FALSE,
p,
&state,
&save);
- p += soup_base64_encode_step ((guchar *) user,
+ p += soup_base64_encode_step ((const guchar *) user,
ulen,
FALSE,
p,
&state,
&save);
- p += soup_base64_encode_step ((guchar *) host,
+ p += soup_base64_encode_step ((const guchar *) host,
hlen,
FALSE,
p,
Index: libsoup/soup-misc.c
===================================================================
RCS file: /cvs/gnome/libsoup/libsoup/soup-misc.c,v
retrieving revision 1.45
diff -u -p -r1.45 soup-misc.c
--- libsoup/soup-misc.c 10 Nov 2005 16:52:30 -0000 1.45
+++ libsoup/soup-misc.c 13 Sep 2006 15:46:57 -0000
@@ -53,7 +53,7 @@ soup_str_case_equal (gconstpointer v1,
/* Base64 utils (straight from camel-mime-utils.c) */
#define d(x)
-static char *base64_alphabet =
+static const char *base64_alphabet =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
/*
Index: libsoup/soup-soap-message.c
===================================================================
RCS file: /cvs/gnome/libsoup/libsoup/soup-soap-message.c,v
retrieving revision 1.14
diff -u -p -r1.14 soup-soap-message.c
--- libsoup/soup-soap-message.c 2 Apr 2006 21:46:18 -0000 1.14
+++ libsoup/soup-soap-message.c 13 Sep 2006 15:46:57 -0000
@@ -56,7 +56,7 @@ soup_soap_message_init (SoupSoapMessage
SoupSoapMessagePrivate *priv = SOUP_SOAP_MESSAGE_GET_PRIVATE (msg);
/* initialize XML structures */
- priv->doc = xmlNewDoc ((xmlChar *)"1.0");
+ priv->doc = xmlNewDoc ((const xmlChar *)"1.0");
priv->doc->standalone = FALSE;
priv->doc->encoding = xmlCharStrdup ("UTF-8");
}
@@ -69,11 +69,11 @@ fetch_ns (SoupSoapMessage *msg, const ch
xmlNsPtr ns = NULL;
if (prefix && ns_uri)
- ns = xmlNewNs (priv->last_node, (xmlChar *)ns_uri, (xmlChar *)prefix);
+ ns = xmlNewNs (priv->last_node, (const xmlChar *)ns_uri, (const xmlChar *)prefix);
else if (prefix && !ns_uri) {
- ns = xmlSearchNs (priv->doc, priv->last_node, (xmlChar *)prefix);
+ ns = xmlSearchNs (priv->doc, priv->last_node, (const xmlChar *)prefix);
if (!ns)
- ns = xmlNewNs (priv->last_node, (xmlChar *)"", (xmlChar *)prefix);
+ ns = xmlNewNs (priv->last_node, (const xmlChar *)"", (const xmlChar *)prefix);
}
return ns;
@@ -169,12 +169,12 @@ soup_soap_message_start_envelope (SoupSo
priv = SOUP_SOAP_MESSAGE_GET_PRIVATE (msg);
priv->last_node = priv->doc->xmlRootNode =
- xmlNewDocNode (priv->doc, NULL, (xmlChar *)"Envelope", NULL);
+ xmlNewDocNode (priv->doc, NULL, (const xmlChar *)"Envelope", NULL);
priv->soap_ns = xmlNewNs (priv->doc->xmlRootNode,
priv->env_uri ? priv->env_uri :
- (xmlChar *)"http://schemas.xmlsoap.org/soap/envelope/",
- priv->env_prefix ? priv->env_prefix : (xmlChar *)"SOAP-ENV");
+ (const xmlChar *)"http://schemas.xmlsoap.org/soap/envelope/",
+ priv->env_prefix ? priv->env_prefix : (const xmlChar *)"SOAP-ENV");
if (priv->env_uri) {
xmlFree (priv->env_uri);
priv->env_uri = NULL;
@@ -187,17 +187,17 @@ soup_soap_message_start_envelope (SoupSo
xmlSetNs (priv->doc->xmlRootNode, priv->soap_ns);
xmlNewNs (priv->doc->xmlRootNode,
- (xmlChar *)"http://schemas.xmlsoap.org/soap/encoding/",
- (xmlChar *)"SOAP-ENC");
+ (const xmlChar *)"http://schemas.xmlsoap.org/soap/encoding/",
+ (const xmlChar *)"SOAP-ENC");
xmlNewNs (priv->doc->xmlRootNode,
- (xmlChar *)"http://www.w3.org/1999/XMLSchema",
- (xmlChar *)"xsd");
+ (const xmlChar *)"http://www.w3.org/1999/XMLSchema",
+ (const xmlChar *)"xsd");
xmlNewNs (priv->doc->xmlRootNode,
- (xmlChar *)"http://schemas.xmlsoap.org/soap/envelope/",
- (xmlChar *)"SOAP-ENV");
+ (const xmlChar *)"http://schemas.xmlsoap.org/soap/envelope/",
+ (const xmlChar *)"SOAP-ENV");
priv->xsi_ns = xmlNewNs (priv->doc->xmlRootNode,
- (xmlChar *)"http://www.w3.org/1999/XMLSchema-instance",
- (xmlChar *)"xsi");
+ (const xmlChar *)"http://www.w3.org/1999/XMLSchema-instance",
+ (const xmlChar *)"xsi");
}
/**
@@ -231,7 +231,7 @@ soup_soap_message_start_body (SoupSoapMe
priv->last_node = xmlNewChild (priv->last_node,
priv->soap_ns,
- (xmlChar *)"Body", NULL);
+ (const xmlChar *)"Body", NULL);
priv->body_started = TRUE;
}
@@ -280,7 +280,7 @@ soup_soap_message_start_element (SoupSoa
g_return_if_fail (SOUP_IS_SOAP_MESSAGE (msg));
priv = SOUP_SOAP_MESSAGE_GET_PRIVATE (msg);
- priv->last_node = xmlNewChild (priv->last_node, NULL, (xmlChar *)name, NULL);
+ priv->last_node = xmlNewChild (priv->last_node, NULL, (const xmlChar *)name, NULL);
xmlSetNs (priv->last_node, fetch_ns (msg, prefix, ns_uri));
@@ -333,12 +333,12 @@ soup_soap_message_start_fault (SoupSoapM
priv->last_node = xmlNewChild (priv->last_node,
priv->soap_ns,
- (xmlChar *)"Fault", NULL);
- xmlNewChild (priv->last_node, priv->soap_ns, (xmlChar *)"faultcode", (xmlChar *)faultcode);
- xmlNewChild (priv->last_node, priv->soap_ns, (xmlChar *)"faultstring", (xmlChar *)faultstring);
+ (const xmlChar *)"Fault", NULL);
+ xmlNewChild (priv->last_node, priv->soap_ns, (const xmlChar *)"faultcode", (const xmlChar *)faultcode);
+ xmlNewChild (priv->last_node, priv->soap_ns, (const xmlChar *)"faultstring", (const xmlChar *)faultstring);
priv->last_node = xmlNewChild (priv->last_node, priv->soap_ns,
- (xmlChar *)"faultfactor", (xmlChar *)faultfactor);
+ (const xmlChar *)"faultfactor", (const xmlChar *)faultfactor);
if (!faultfactor)
soup_soap_message_set_null (msg);
@@ -375,7 +375,7 @@ soup_soap_message_start_fault_detail (So
priv->last_node = xmlNewChild (priv->last_node,
priv->soap_ns,
- (xmlChar *)"detail",
+ (const xmlChar *)"detail",
NULL);
}
@@ -412,7 +412,7 @@ soup_soap_message_start_header (SoupSoap
priv = SOUP_SOAP_MESSAGE_GET_PRIVATE (msg);
priv->last_node = xmlNewChild (priv->last_node, priv->soap_ns,
- (xmlChar *)"Header", NULL);
+ (const xmlChar *)"Header", NULL);
}
/**
@@ -454,9 +454,9 @@ soup_soap_message_start_header_element (
soup_soap_message_start_element (msg, name, prefix, ns_uri);
if (actor_uri)
- xmlNewNsProp (priv->last_node, priv->soap_ns, (xmlChar *)"actorUri", (xmlChar *)actor_uri);
+ xmlNewNsProp (priv->last_node, priv->soap_ns, (const xmlChar *)"actorUri", (const xmlChar *)actor_uri);
if (must_understand)
- xmlNewNsProp (priv->last_node, priv->soap_ns, (xmlChar *)"mustUnderstand", (xmlChar *)"1");
+ xmlNewNsProp (priv->last_node, priv->soap_ns, (const xmlChar *)"mustUnderstand", (const xmlChar *)"1");
}
/**
@@ -548,7 +548,7 @@ soup_soap_message_write_string (SoupSoap
g_return_if_fail (SOUP_IS_SOAP_MESSAGE (msg));
priv = SOUP_SOAP_MESSAGE_GET_PRIVATE (msg);
- xmlNodeAddContent (priv->last_node, (xmlChar *)string);
+ xmlNodeAddContent (priv->last_node, (const xmlChar *)string);
}
/**
@@ -568,7 +568,7 @@ soup_soap_message_write_buffer (SoupSoap
g_return_if_fail (SOUP_IS_SOAP_MESSAGE (msg));
priv = SOUP_SOAP_MESSAGE_GET_PRIVATE (msg);
- xmlNodeAddContentLen (priv->last_node, (xmlChar *)buffer, len);
+ xmlNodeAddContentLen (priv->last_node, (const xmlChar *)buffer, len);
}
/**
@@ -587,7 +587,7 @@ soup_soap_message_set_element_type (Soup
g_return_if_fail (SOUP_IS_SOAP_MESSAGE (msg));
priv = SOUP_SOAP_MESSAGE_GET_PRIVATE (msg);
- xmlNewNsProp (priv->last_node, priv->xsi_ns, (xmlChar *)"type", (xmlChar *)xsi_type);
+ xmlNewNsProp (priv->last_node, priv->xsi_ns, (const xmlChar *)"type", (const xmlChar *)xsi_type);
}
/**
@@ -604,7 +604,7 @@ soup_soap_message_set_null (SoupSoapMess
g_return_if_fail (SOUP_IS_SOAP_MESSAGE (msg));
priv = SOUP_SOAP_MESSAGE_GET_PRIVATE (msg);
- xmlNewNsProp (priv->last_node, priv->xsi_ns, (xmlChar *)"null", (xmlChar *)"1");
+ xmlNewNsProp (priv->last_node, priv->xsi_ns, (const xmlChar *)"null", (const xmlChar *)"1");
}
/**
@@ -631,7 +631,7 @@ soup_soap_message_add_attribute (SoupSoa
xmlNewNsProp (priv->last_node,
fetch_ns (msg, prefix, ns_uri),
- (xmlChar *)name, (xmlChar *)value);
+ (const xmlChar *)name, (const xmlChar *)value);
}
/**
@@ -650,7 +650,7 @@ soup_soap_message_add_namespace (SoupSoa
g_return_if_fail (SOUP_IS_SOAP_MESSAGE (msg));
priv = SOUP_SOAP_MESSAGE_GET_PRIVATE (msg);
- xmlNewNs (priv->last_node, (xmlChar *)(ns_uri ? ns_uri : ""), (xmlChar *)prefix);
+ xmlNewNs (priv->last_node, (const xmlChar *)(ns_uri ? ns_uri : ""), (const xmlChar *)prefix);
}
/**
@@ -689,7 +689,7 @@ soup_soap_message_set_encoding_style (So
g_return_if_fail (SOUP_IS_SOAP_MESSAGE (msg));
priv = SOUP_SOAP_MESSAGE_GET_PRIVATE (msg);
- xmlNewNsProp (priv->last_node, priv->soap_ns, (xmlChar *)"encodingStyle", (xmlChar *)enc_style);
+ xmlNewNsProp (priv->last_node, priv->soap_ns, (const xmlChar *)"encodingStyle", (const xmlChar *)enc_style);
}
/**
@@ -707,7 +707,7 @@ soup_soap_message_reset (SoupSoapMessage
priv = SOUP_SOAP_MESSAGE_GET_PRIVATE (msg);
xmlFreeDoc (priv->doc);
- priv->doc = xmlNewDoc ((xmlChar *)"1.0");
+ priv->doc = xmlNewDoc ((const xmlChar *)"1.0");
priv->last_node = NULL;
g_free (priv->action);
@@ -767,10 +767,10 @@ soup_soap_message_get_namespace_prefix (
priv = SOUP_SOAP_MESSAGE_GET_PRIVATE (msg);
g_return_val_if_fail (ns_uri != NULL, NULL);
- ns = xmlSearchNsByHref (priv->doc, priv->last_node, (xmlChar *)ns_uri);
+ ns = xmlSearchNsByHref (priv->doc, priv->last_node, (const xmlChar *)ns_uri);
if (ns) {
if (ns->prefix)
- return (char *)ns->prefix;
+ return (const char *)ns->prefix;
else
return "";
}
Index: libsoup/soup-xmlrpc-message.c
===================================================================
RCS file: /cvs/gnome/libsoup/libsoup/soup-xmlrpc-message.c,v
retrieving revision 1.5
diff -u -p -r1.5 soup-xmlrpc-message.c
--- libsoup/soup-xmlrpc-message.c 24 Jul 2006 22:05:56 -0000 1.5
+++ libsoup/soup-xmlrpc-message.c 13 Sep 2006 15:46:57 -0000
@@ -57,7 +57,7 @@ soup_xmlrpc_message_init (SoupXmlrpcMess
xmlKeepBlanksDefault (0);
- priv->doc = xmlNewDoc ((xmlChar *)"1.0");
+ priv->doc = xmlNewDoc ((const xmlChar *)"1.0");
priv->doc->standalone = FALSE;
priv->doc->encoding = xmlCharStrdup ("UTF-8");
}
@@ -100,14 +100,14 @@ soup_xmlrpc_message_start_call (SoupXmlr
g_return_if_fail (SOUP_IS_XMLRPC_MESSAGE (msg));
- root = xmlNewDocNode (priv->doc, NULL, (xmlChar *)"methodCall", NULL);
+ root = xmlNewDocNode (priv->doc, NULL, (const xmlChar *)"methodCall", NULL);
xmlDocSetRootElement (priv->doc, root);
- xmlNewChild (root, NULL, (xmlChar *)"methodName", (xmlChar *)method_name);
+ xmlNewChild (root, NULL, (const xmlChar *)"methodName", (const xmlChar *)method_name);
priv->last_node = root;
- priv->last_node = xmlNewChild (priv->last_node, NULL, (xmlChar *)"params", NULL);
+ priv->last_node = xmlNewChild (priv->last_node, NULL, (const xmlChar *)"params", NULL);
}
void
@@ -128,7 +128,7 @@ soup_xmlrpc_message_start_param (SoupXml
g_return_if_fail (SOUP_IS_XMLRPC_MESSAGE (msg));
priv = SOUP_XMLRPC_MESSAGE_GET_PRIVATE (msg);
- priv->last_node = xmlNewChild (priv->last_node, NULL, (xmlChar *)"param", NULL);
+ priv->last_node = xmlNewChild (priv->last_node, NULL, (const xmlChar *)"param", NULL);
}
void
@@ -150,8 +150,8 @@ soup_xmlrpc_message_write_int (SoupXmlrp
str = g_strdup_printf ("%ld", i);
- priv->last_node = xmlNewChild (priv->last_node, NULL, (xmlChar *)"value", NULL);
- xmlNewTextChild (priv->last_node, NULL, (xmlChar *)"i4", (xmlChar *)str);
+ priv->last_node = xmlNewChild (priv->last_node, NULL, (const xmlChar *)"value", NULL);
+ xmlNewTextChild (priv->last_node, NULL, (const xmlChar *)"i4", (xmlChar *)str);
soup_xmlrpc_message_end_element (msg);
g_free (str);
@@ -165,8 +165,8 @@ soup_xmlrpc_message_write_boolean (SoupX
g_return_if_fail (SOUP_IS_XMLRPC_MESSAGE (msg));
priv = SOUP_XMLRPC_MESSAGE_GET_PRIVATE (msg);
- priv->last_node = xmlNewChild (priv->last_node, NULL, (xmlChar *)"value", NULL);
- xmlNewChild (priv->last_node, NULL, (xmlChar *)"boolean", b ? (xmlChar *)"1" : (xmlChar *)"0");
+ priv->last_node = xmlNewChild (priv->last_node, NULL, (const xmlChar *)"value", NULL);
+ xmlNewChild (priv->last_node, NULL, (const xmlChar *)"boolean", (const xmlChar*)(b ? "1" : "0"));
soup_xmlrpc_message_end_element (msg);
}
@@ -178,8 +178,8 @@ soup_xmlrpc_message_write_string (SoupXm
g_return_if_fail (SOUP_IS_XMLRPC_MESSAGE (msg));
priv = SOUP_XMLRPC_MESSAGE_GET_PRIVATE (msg);
- priv->last_node = xmlNewChild (priv->last_node, NULL, (xmlChar *)"value", NULL);
- xmlNewTextChild (priv->last_node, NULL, (xmlChar *)"string", (xmlChar *)str);
+ priv->last_node = xmlNewChild (priv->last_node, NULL, (const xmlChar *)"value", NULL);
+ xmlNewTextChild (priv->last_node, NULL, (const xmlChar *)"string", (const xmlChar *)str);
soup_xmlrpc_message_end_element (msg);
}
@@ -194,8 +194,8 @@ soup_xmlrpc_message_write_double (SoupXm
str = g_strdup_printf ("%f", d);
- priv->last_node = xmlNewChild (priv->last_node, NULL, (xmlChar *)"value", NULL);
- xmlNewTextChild (priv->last_node, NULL, (xmlChar *)"double", (xmlChar *)str);
+ priv->last_node = xmlNewChild (priv->last_node, NULL, (const xmlChar *)"value", NULL);
+ xmlNewTextChild (priv->last_node, NULL, (const xmlChar *)"double", (xmlChar *)str);
soup_xmlrpc_message_end_element (msg);
g_free (str);
@@ -214,8 +214,8 @@ soup_xmlrpc_message_write_datetime (Soup
soup_gmtime (&timeval, &time);
strftime (str, 128, "%Y%m%dT%H:%M:%S", &time);
- priv->last_node = xmlNewChild (priv->last_node, NULL, (xmlChar *)"value", NULL);
- xmlNewTextChild (priv->last_node, NULL, (xmlChar *)"dateTime.iso8601", (xmlChar *)str);
+ priv->last_node = xmlNewChild (priv->last_node, NULL, (const xmlChar *)"value", NULL);
+ xmlNewTextChild (priv->last_node, NULL, (const xmlChar *)"dateTime.iso8601", (xmlChar *)str);
soup_xmlrpc_message_end_element (msg);
}
@@ -230,8 +230,8 @@ soup_xmlrpc_message_write_base64 (SoupXm
str = soup_base64_encode (buf, len);
- priv->last_node = xmlNewChild (priv->last_node, NULL, (xmlChar *)"value", NULL);
- xmlNewTextChild (priv->last_node, NULL, (xmlChar *)"base64", (xmlChar *)str);
+ priv->last_node = xmlNewChild (priv->last_node, NULL, (const xmlChar *)"value", NULL);
+ xmlNewTextChild (priv->last_node, NULL, (const xmlChar *)"base64", (xmlChar *)str);
soup_xmlrpc_message_end_element (msg);
g_free (str);
@@ -245,8 +245,8 @@ soup_xmlrpc_message_start_struct (SoupXm
g_return_if_fail (SOUP_IS_XMLRPC_MESSAGE (msg));
priv = SOUP_XMLRPC_MESSAGE_GET_PRIVATE (msg);
- priv->last_node = xmlNewChild (priv->last_node, NULL, (xmlChar *)"value", NULL);
- priv->last_node = xmlNewChild (priv->last_node, NULL, (xmlChar *)"struct", NULL);
+ priv->last_node = xmlNewChild (priv->last_node, NULL, (const xmlChar *)"value", NULL);
+ priv->last_node = xmlNewChild (priv->last_node, NULL, (const xmlChar *)"struct", NULL);
}
void
@@ -266,8 +266,8 @@ soup_xmlrpc_message_start_member (SoupXm
g_return_if_fail (SOUP_IS_XMLRPC_MESSAGE (msg));
priv = SOUP_XMLRPC_MESSAGE_GET_PRIVATE (msg);
- priv->last_node = xmlNewChild (priv->last_node, NULL, (xmlChar *)"member", NULL);
- xmlNewChild (priv->last_node, NULL, (xmlChar *)"name", (xmlChar *)name);
+ priv->last_node = xmlNewChild (priv->last_node, NULL, (const xmlChar *)"member", NULL);
+ xmlNewChild (priv->last_node, NULL, (const xmlChar *)"name", (const xmlChar *)name);
}
void
@@ -286,9 +286,9 @@ soup_xmlrpc_message_start_array (SoupXml
g_return_if_fail (SOUP_IS_XMLRPC_MESSAGE (msg));
priv = SOUP_XMLRPC_MESSAGE_GET_PRIVATE (msg);
- priv->last_node = xmlNewChild (priv->last_node, NULL, (xmlChar *)"value", NULL);
- priv->last_node = xmlNewChild (priv->last_node, NULL, (xmlChar *)"array", NULL);
- priv->last_node = xmlNewChild (priv->last_node, NULL, (xmlChar *)"data", NULL);
+ priv->last_node = xmlNewChild (priv->last_node, NULL, (const xmlChar *)"value", NULL);
+ priv->last_node = xmlNewChild (priv->last_node, NULL, (const xmlChar *)"array", NULL);
+ priv->last_node = xmlNewChild (priv->last_node, NULL, (const xmlChar *)"data", NULL);
}
void
@@ -345,15 +345,15 @@ soup_xmlrpc_message_from_string (SoupXml
return FALSE;
body = xmlDocGetRootElement (newdoc);
- if (!body || strcmp ((char *)body->name, "methodCall"))
+ if (!body || strcmp ((const char *)body->name, "methodCall"))
goto bad;
body = body->children;
- if (!body || strcmp ((char *)body->name, "methodName"))
+ if (!body || strcmp ((const char *)body->name, "methodName"))
goto bad;
body = body->next;
- if (!body || strcmp ((char *)body->name, "params"))
+ if (!body || strcmp ((const char *)body->name, "params"))
goto bad;
body = xmlGetLastChild (body);
Index: libsoup/soup-xmlrpc-response.c
===================================================================
RCS file: /cvs/gnome/libsoup/libsoup/soup-xmlrpc-response.c,v
retrieving revision 1.7
diff -u -p -r1.7 soup-xmlrpc-response.c
--- libsoup/soup-xmlrpc-response.c 19 Jun 2006 16:57:47 -0000 1.7
+++ libsoup/soup-xmlrpc-response.c 13 Sep 2006 15:46:58 -0000
@@ -60,7 +60,7 @@ soup_xmlrpc_response_init (SoupXmlrpcRes
{
SoupXmlrpcResponsePrivate *priv = SOUP_XMLRPC_RESPONSE_GET_PRIVATE (response);
- priv->doc = xmlNewDoc ((xmlChar *)"1.0");
+ priv->doc = xmlNewDoc ((const xmlChar *)"1.0");
priv->fault = FALSE;
}
@@ -130,23 +130,23 @@ soup_xmlrpc_response_from_string (SoupXm
goto very_bad;
body = xmlDocGetRootElement (newdoc);
- if (!body || strcmp ((char *)body->name, "methodResponse"))
+ if (!body || strcmp ((const char *)body->name, "methodResponse"))
goto bad;
body = exactly_one_child (body);
if (!body)
goto bad;
- if (strcmp ((char *)body->name, "params") == 0) {
+ if (strcmp ((const char *)body->name, "params") == 0) {
fault = FALSE;
body = exactly_one_child (body);
- if (!body || strcmp ((char *)body->name, "param"))
+ if (!body || strcmp ((const char *)body->name, "param"))
goto bad;
- } else if (strcmp ((char *)body->name, "fault") != 0)
+ } else if (strcmp ((const char *)body->name, "fault") != 0)
goto bad;
body = exactly_one_child (body);
- if (!body || strcmp ((char *)body->name, "value"))
+ if (!body || strcmp ((const char *)body->name, "value"))
goto bad;
/* body should be pointing by now to the struct of a fault, or the value of a
@@ -206,28 +206,28 @@ soup_xmlrpc_value_get_type (SoupXmlrpcVa
xml = (xmlNode *) value;
- if (strcmp ((char *)xml->name, "value"))
+ if (strcmp ((const char *)xml->name, "value"))
return SOUP_XMLRPC_VALUE_TYPE_BAD;
xml = exactly_one_child (xml);
if (!xml)
return SOUP_XMLRPC_VALUE_TYPE_BAD;
- if (strcmp ((char *)xml->name, "i4") == 0 || strcmp ((char *)xml->name, "int") == 0)
+ if (strcmp ((const char *)xml->name, "i4") == 0 || strcmp ((const char *)xml->name, "int") == 0)
return SOUP_XMLRPC_VALUE_TYPE_INT;
- else if (strcmp ((char *)xml->name, "boolean") == 0)
+ else if (strcmp ((const char *)xml->name, "boolean") == 0)
return SOUP_XMLRPC_VALUE_TYPE_BOOLEAN;
- else if (strcmp ((char *)xml->name, "string") == 0)
+ else if (strcmp ((const char *)xml->name, "string") == 0)
return SOUP_XMLRPC_VALUE_TYPE_STRING;
- else if (strcmp ((char *)xml->name, "double") == 0)
+ else if (strcmp ((const char *)xml->name, "double") == 0)
return SOUP_XMLRPC_VALUE_TYPE_DOUBLE;
- else if (strcmp ((char *)xml->name, "dateTime.iso8601") == 0)
+ else if (strcmp ((const char *)xml->name, "dateTime.iso8601") == 0)
return SOUP_XMLRPC_VALUE_TYPE_DATETIME;
- else if (strcmp ((char *)xml->name, "base64") == 0)
+ else if (strcmp ((const char *)xml->name, "base64") == 0)
return SOUP_XMLRPC_VALUE_TYPE_BASE64;
- else if (strcmp ((char *)xml->name, "struct") == 0)
+ else if (strcmp ((const char *)xml->name, "struct") == 0)
return SOUP_XMLRPC_VALUE_TYPE_STRUCT;
- else if (strcmp ((char *)xml->name, "array") == 0)
+ else if (strcmp ((const char *)xml->name, "array") == 0)
return SOUP_XMLRPC_VALUE_TYPE_ARRAY;
else
return SOUP_XMLRPC_VALUE_TYPE_BAD;
@@ -243,10 +243,10 @@ soup_xmlrpc_value_get_int (SoupXmlrpcVal
xml = (xmlNode *) value;
- if (strcmp ((char *)xml->name, "value"))
+ if (strcmp ((const char *)xml->name, "value"))
return FALSE;
xml = exactly_one_child (xml);
- if (!xml || (strcmp ((char *)xml->name, "int") && strcmp ((char *)xml->name, "i4")))
+ if (!xml || (strcmp ((const char *)xml->name, "int") && strcmp ((const char *)xml->name, "i4")))
return FALSE;
/* FIXME this should be exactly one text node */
@@ -268,10 +268,10 @@ soup_xmlrpc_value_get_double (SoupXmlrpc
xml = (xmlNode *) value;
- if (strcmp ((char *)xml->name, "value"))
+ if (strcmp ((const char *)xml->name, "value"))
return FALSE;
xml = exactly_one_child (xml);
- if (!xml || (strcmp ((char *)xml->name, "double")))
+ if (!xml || (strcmp ((const char *)xml->name, "double")))
return FALSE;
/* FIXME this should be exactly one text node */
@@ -294,10 +294,10 @@ soup_xmlrpc_value_get_boolean (SoupXmlrp
xml = (xmlNode *) value;
- if (strcmp ((char *)xml->name, "value"))
+ if (strcmp ((const char *)xml->name, "value"))
return FALSE;
xml = exactly_one_child (xml);
- if (!xml || strcmp ((char *)xml->name, "boolean"))
+ if (!xml || strcmp ((const char *)xml->name, "boolean"))
return FALSE;
content = xmlNodeGetContent (xml);
@@ -317,10 +317,10 @@ soup_xmlrpc_value_get_string (SoupXmlrpc
xml = (xmlNode *) value;
- if (strcmp ((char *)xml->name, "value"))
+ if (strcmp ((const char *)xml->name, "value"))
return FALSE;
xml = exactly_one_child (xml);
- if (!xml || strcmp ((char *)xml->name, "string"))
+ if (!xml || strcmp ((const char *)xml->name, "string"))
return FALSE;
content = xmlNodeGetContent (xml);
@@ -338,10 +338,10 @@ soup_xmlrpc_value_get_datetime (SoupXmlr
xml = (xmlNode *) value;
- if (strcmp ((char *)xml->name, "value"))
+ if (strcmp ((const char *)xml->name, "value"))
return FALSE;
xml = exactly_one_child (xml);
- if (!xml || (strcmp ((char *)xml->name, "dateTime.iso8601")))
+ if (!xml || (strcmp ((const char *)xml->name, "dateTime.iso8601")))
return FALSE;
/* FIXME this should be exactly one text node */
@@ -365,10 +365,10 @@ soup_xmlrpc_value_get_base64 (SoupXmlrpc
int len;
xml = (xmlNode *) value;
- if (strcmp ((char *)xml->name, "value"))
+ if (strcmp ((const char *)xml->name, "value"))
return FALSE;
xml = exactly_one_child (xml);
- if (!xml || strcmp ((char *)xml->name, "base64"))
+ if (!xml || strcmp ((const char *)xml->name, "base64"))
return FALSE;
content = xmlNodeGetContent (xml);
@@ -391,11 +391,11 @@ soup_xmlrpc_value_get_struct (SoupXmlrpc
xml = (xmlNode *) value;
- if (strcmp ((char *)xml->name, "value"))
+ if (strcmp ((const char *)xml->name, "value"))
return FALSE;
xml = exactly_one_child (xml);
- if (!xml || strcmp ((char *)xml->name, "struct"))
+ if (!xml || strcmp ((const char *)xml->name, "struct"))
return FALSE;
t = g_hash_table_new_full (g_str_hash, g_str_equal, xmlFree, NULL);
@@ -404,19 +404,19 @@ soup_xmlrpc_value_get_struct (SoupXmlrpc
xmlChar *name;
xmlNode *val, *cur;
- if (strcmp ((char *)xml->name, "member") || !xml->children)
+ if (strcmp ((const char *)xml->name, "member") || !xml->children)
goto bad;
name = NULL;
val = NULL;
for (cur = xml->children; cur; cur = cur->next) {
- if (strcmp((char *)cur->name, "name") == 0) {
+ if (strcmp((const char *)cur->name, "name") == 0) {
if (name)
goto local_bad;
name = xmlNodeGetContent (cur);
}
- else if (strcmp ((char *)cur->name, "value") == 0)
+ else if (strcmp ((const char *)cur->name, "value") == 0)
val = cur;
else goto local_bad;
@@ -448,9 +448,9 @@ soup_xmlrpc_value_array_get_iterator (So
xml = (xmlNode *) value;
- if (!xml->children || strcmp((char *)xml->children->name, "array") != 0 ||
+ if (!xml->children || strcmp((const char *)xml->children->name, "array") != 0 ||
xml->children->next || !xml->children->children ||
- strcmp((char *)xml->children->children->name, "data") != 0 ||
+ strcmp((const char *)xml->children->children->name, "data") != 0 ||
xml->children->children->next)
return FALSE;
Index: tests/getbug.c
===================================================================
RCS file: /cvs/gnome/libsoup/tests/getbug.c,v
retrieving revision 1.1
diff -u -p -r1.1 getbug.c
--- tests/getbug.c 14 Jun 2005 16:40:23 -0000 1.1
+++ tests/getbug.c 13 Sep 2006 15:46:58 -0000
@@ -75,7 +75,7 @@ main (int argc, char **argv)
{
SoupUri *proxy = NULL;
SoupXmlrpcMessage *msg;
- char *uri = "http://bugzilla.redhat.com/bugzilla/xmlrpc.cgi";
+ const char *uri = "http://bugzilla.redhat.com/bugzilla/xmlrpc.cgi";
int opt, bug;
g_type_init ();
Index: tests/uri-parsing.c
===================================================================
RCS file: /cvs/gnome/libsoup/tests/uri-parsing.c,v
retrieving revision 1.5
diff -u -p -r1.5 uri-parsing.c
--- tests/uri-parsing.c 15 Jul 2005 17:53:11 -0000 1.5
+++ tests/uri-parsing.c 13 Sep 2006 15:46:58 -0000
@@ -7,7 +7,7 @@
#include "libsoup/soup-uri.h"
struct {
- char *uri_string, *result;
+ const char *uri_string, *result;
} abs_tests[] = {
{ "foo:", "foo:" },
{ "file:/dev/null", "file:/dev/null" },
@@ -33,9 +33,9 @@ struct {
int num_abs_tests = G_N_ELEMENTS(abs_tests);
/* From RFC 2396. */
-char *base = "http://a/b/c/d;p?q";
+const char *base = "http://a/b/c/d;p?q";
struct {
- char *uri_string, *result;
+ const char *uri_string, *result;
} rel_tests[] = {
{ "g:h", "g:h" },
{ "g", "http://a/b/c/g" },
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]