From: Enlightenment S. <no-...@en...> - 2010-09-25 21:40:11
|
Log: eupnp/av: fix warnings. Author: dieb Date: 2010-09-25 14:40:04 -0700 (Sat, 25 Sep 2010) New Revision: 52757 Modified: trunk/PROTO/eupnp/src/lib/eupnp_av/eupnp_av.c Modified: trunk/PROTO/eupnp/src/lib/eupnp_av/eupnp_av.c =================================================================== --- trunk/PROTO/eupnp/src/lib/eupnp_av/eupnp_av.c 2010-09-25 21:39:55 UTC (rev 52756) +++ trunk/PROTO/eupnp/src/lib/eupnp_av/eupnp_av.c 2010-09-25 21:40:04 UTC (rev 52757) @@ -23,11 +23,14 @@ # include "config.h" #endif -#include <libxml/SAX2.h> - +#include <stdio.h> +#include <ctype.h> #include <string.h> #include <Eina.h> +#include <libxml/SAX2.h> + + #include "Eupnp_AV.h" #define DBG(...) EINA_LOG_DOM_DBG(_log_dom, __VA_ARGS__) @@ -140,8 +143,8 @@ static void eupnp_av_didl_object_parse_basic_attrs(DIDL_Object *obj, int nb_attributes, - int nb_defaulted, - const xmlChar **attributes) + int nb_defaulted __UNUSED__, + const char **attributes) { int i; int index = 0; @@ -165,7 +168,7 @@ static void eupnp_av_didl_object_parse_item_attrs(DIDL_Item *item, int nb_attributes, int nb_defaulted, - const xmlChar **attributes) + const char **attributes) { eupnp_av_didl_object_parse_basic_attrs(&item->parent, nb_attributes, nb_defaulted, attributes); @@ -176,7 +179,7 @@ static void eupnp_av_didl_object_parse_container_attrs(DIDL_Container *c, int nb_attributes, int nb_defaulted, - const xmlChar **attributes) + const char **attributes) { eupnp_av_didl_object_parse_basic_attrs(&c->parent, nb_attributes, nb_defaulted, attributes); @@ -199,8 +202,8 @@ static void eupnp_av_didl_object_parse_res_attrs(DIDL_Resource *r, int nb_attributes, - int nb_defaulted, - const xmlChar **attributes) + int nb_defaulted __UNUSED__, + const char **attributes) { int i; int index = 0; @@ -259,13 +262,13 @@ } static void -eupnp_av_element_ns_start(void *ctx, const xmlChar *name, const xmlChar *prefix, - const xmlChar *URI, int nb_namespaces, - const xmlChar **namespaces, int nb_attributes, - int nb_defaulted, const xmlChar **attributes) +eupnp_av_element_ns_start(void *ctx, const char *name, + const xmlChar *prefix __UNUSED__, + const xmlChar *URI __UNUSED__, int nb_namespaces __UNUSED__, + const xmlChar **namespaces __UNUSED__, int nb_attributes, + int nb_defaulted, const char **attributes) { Context *c = ctx; - int i; switch (c->state) { @@ -320,7 +323,7 @@ } static void -eupnp_av_on_characters(void *ctx, const xmlChar *ch, int len) +eupnp_av_on_characters(void *ctx, const char *ch, int len) { Context *c = ctx; const char *end; @@ -346,7 +349,7 @@ else { char *tmp = strndup(ch, len); - asprintf(&c->container->parent.title, "%s%s", c->container->parent.title, tmp); + asprintf((char **) &c->container->parent.title, "%s%s", c->container->parent.title, tmp); free(tmp); } } @@ -363,7 +366,7 @@ else { char *tmp = strndup(ch, len); - asprintf(&c->item->parent.title, "%s%s", c->item->parent.title, tmp); + asprintf((char **) &c->item->parent.title, "%s%s", c->item->parent.title, tmp); free(tmp); } } @@ -379,8 +382,9 @@ } static void -eupnp_av_element_ns_end(void *ctx, const xmlChar *name, const xmlChar *prefix, - const xmlChar *URI) +eupnp_av_element_ns_end(void *ctx, const xmlChar *name, + const xmlChar *prefix __UNUSED__, + const xmlChar *URI __UNUSED__) { Context *c = ctx; @@ -427,7 +431,7 @@ } static void -error(void *state, const char *msg, ...) +error(void *state __UNUSED__ , const char *msg, ...) { va_list args; va_start(args, msg); @@ -474,8 +478,8 @@ memset(&handler, 0, sizeof(xmlSAXHandler)); handler.initialized = XML_SAX2_MAGIC; - handler.characters = &eupnp_av_on_characters; - handler.startElementNs = &eupnp_av_element_ns_start; + handler.characters = (charactersSAXFunc) &eupnp_av_on_characters; + handler.startElementNs = (startElementNsSAX2Func) &eupnp_av_element_ns_start; handler.endElementNs = &eupnp_av_element_ns_end; handler.error = &error; |