Module: kamailio Branch: master Commit: e15d415323b44a93acd2d811fa3609af141e814e URL: https://github.com/kamailio/kamailio/commit/e15d415323b44a93acd2d811fa3609af...
Author: Victor Seva linuxmaniac@torreviejawireless.org Committer: Victor Seva linuxmaniac@torreviejawireless.org Date: 2015-05-21T23:33:39+02:00
purple: clean gcc warnings
hashtable.c:39:3: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] hashtable.c:39:3: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] hashtable.c:39:3: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] hashtable.c:39:3: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] hashtable.c:43:2: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] hashtable.c:43:2: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] hashtable.c:43:2: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] hashtable.c:43:2: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] purple_sip.c:77:36: warning: variable âcipid_nsâ set but not used [-Wunused-but-set-variable]
---
Modified: modules/purple/hashtable.c Modified: modules/purple/purple_sip.c
---
Diff: https://github.com/kamailio/kamailio/commit/e15d415323b44a93acd2d811fa3609af... Patch: https://github.com/kamailio/kamailio/commit/e15d415323b44a93acd2d811fa3609af...
---
diff --git a/modules/purple/hashtable.c b/modules/purple/hashtable.c index 1c5d02a..5d6159d 100644 --- a/modules/purple/hashtable.c +++ b/modules/purple/hashtable.c @@ -36,11 +36,11 @@ static int *get_counter(char *key) { if (d == NULL) { gchar *k = g_strdup(key); d = (int*) pkg_malloc(sizeof(int)); - LM_DBG("counter created @0x%08x\n", (unsigned int)d); + LM_DBG("counter created @0x%p\n", d); *d = 0; g_hash_table_insert(hash, k, d); } - LM_DBG("counter@0x%08x: key: %s ; value: %d\n", (unsigned int)d, key, *d); + LM_DBG("counter@0x%p: key: %s ; value: %d\n", d, key, *d); return d; }
diff --git a/modules/purple/purple_sip.c b/modules/purple/purple_sip.c index 4f5f2c2..88f95dd 100644 --- a/modules/purple/purple_sip.c +++ b/modules/purple/purple_sip.c @@ -74,7 +74,7 @@ static str* build_pidf(char *uri, char *id, enum purple_publish_basic basic, enu xmlNodePtr root_node = NULL, status_node = NULL; xmlNodePtr tuple_node = NULL, basic_node = NULL; xmlNodePtr person_node = NULL, activities_node = NULL; - xmlNsPtr pidf_ns, dm_ns, rpid_ns, cipid_ns; + xmlNsPtr pidf_ns, dm_ns, rpid_ns; char* entity = NULL;
entity = (char*)pkg_malloc(7+ strlen(uri)*sizeof(char)); @@ -104,7 +104,7 @@ static str* build_pidf(char *uri, char *id, enum purple_publish_basic basic, enu pidf_ns = xmlNewNs(root_node, BAD_CAST "urn:ietf:params:xml:ns:pidf", NULL); dm_ns = xmlNewNs(root_node, BAD_CAST "urn:ietf:params:xml:ns:pidf:data-model", BAD_CAST "dm"); rpid_ns = xmlNewNs(root_node, BAD_CAST "urn:ietf:params:xml:ns:pidf:rpid", BAD_CAST "rpid"); - cipid_ns = xmlNewNs(root_node, BAD_CAST "urn:ietf:params:xml:ns:pidf:cipid", BAD_CAST "c"); + xmlNewNs(root_node, BAD_CAST "urn:ietf:params:xml:ns:pidf:cipid", BAD_CAST "c"); tuple_node = xmlNewChild(root_node, NULL, BAD_CAST "tuple", NULL); if( tuple_node == NULL) {