[PATCH] meta_data compiler warnings

Vincent CHAVANIS <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <[email protected]>
patch that fixes compiler warnings from "nikos"'s mail.
meta_warning.txt (text/plain, 1.2 KB)
diff -rauw /gateway-cvs/gw/meta_data.c /gateway/gw/meta_data.c
--- /gateway-cvs/gw/meta_data.c 2009-01-14 12:11:46.000000000 +0100
+++ /gateway/gw/meta_data.c     2009-02-06 15:04:09.000000000 +0100
@@ -335,12 +335,12 @@
     }
     if (replace) {
         /* delete old value if any */
-        dict_put(curr->values, key, NULL);
+        dict_put(curr->values, (Octstr *) key, NULL);
         /* put new value */
-        dict_put(curr->values, key, octstr_duplicate(value));
-    } else if (dict_get(curr->values, key) == NULL) {
+        dict_put(curr->values, (Octstr *) key, octstr_duplicate(value));
+    } else if (dict_get(curr->values, (Octstr *) key) == NULL) {
         /* put new value */
-        dict_put(curr->values, key, octstr_duplicate(value));
+        dict_put(curr->values, (Octstr *) key, octstr_duplicate(value));
     }
 
     /* pack it */
@@ -365,7 +365,7 @@
         return NULL;
     for (curr = mdata; curr != NULL; curr = curr->next) {
         if (octstr_str_case_compare(curr->group, group) == 0) {
-            ret = dict_remove(curr->values, key);
+            ret = dict_remove(curr->values, (Octstr *) key);
             break;
         }
     }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.