فهرست منبع

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]
Victor Seva 10 سال پیش
والد
کامیت
e15d415323
2فایلهای تغییر یافته به همراه4 افزوده شده و 4 حذف شده
  1. 2 2
      modules/purple/hashtable.c
  2. 2 2
      modules/purple/purple_sip.c

+ 2 - 2
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;
 }
 

+ 2 - 2
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) {