[asterisk-commits] tilghman: trunk r141507 - /trunk/funcs/func_curl.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat Sep 6 10:40:16 CDT 2008


Author: tilghman
Date: Sat Sep  6 10:40:15 2008
New Revision: 141507

URL: http://svn.digium.com/view/asterisk?view=rev&rev=141507
Log:
Get rid of the casts that cause warnings on OpenBSD.  The compiler is errantly
detecting warnings when we redefine a structure each time it is used, even
though the structure is identical.
Reported by: mvanbaak, via #asterisk-dev

Modified:
    trunk/funcs/func_curl.c

Modified: trunk/funcs/func_curl.c
URL: http://svn.digium.com/view/asterisk/trunk/funcs/func_curl.c?view=diff&rev=141507&r1=141506&r2=141507
==============================================================================
--- trunk/funcs/func_curl.c (original)
+++ trunk/funcs/func_curl.c Sat Sep  6 10:40:15 2008
@@ -155,7 +155,7 @@
 static int acf_curlopt_write(struct ast_channel *chan, const char *cmd, char *name, const char *value)
 {
 	struct ast_datastore *store;
-	AST_LIST_HEAD(global_curl_info, curl_settings) *list;
+	struct global_curl_info *list;
 	struct curl_settings *cur, *new = NULL;
 	CURLoption key;
 	enum optiontype ot;
@@ -181,7 +181,7 @@
 		}
 	} else {
 		/* Populate the global structure */
-		list = (struct global_curl_info *)&global_curl_info;
+		list = &global_curl_info;
 	}
 
 	if (!parse_curlopt_key(name, &key, &ot)) {
@@ -274,7 +274,7 @@
 static int acf_curlopt_read(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len)
 {
 	struct ast_datastore *store;
-	AST_LIST_HEAD(global_curl_info, curl_settings) *list[2] = { (struct global_curl_info *)&global_curl_info, NULL };
+	struct global_curl_info *list[2] = { &global_curl_info, NULL };
 	struct curl_settings *cur;
 	CURLoption key;
 	enum optiontype ot;
@@ -287,7 +287,7 @@
 
 	if (chan && (store = ast_channel_datastore_find(chan, &curl_info, NULL))) {
 		list[0] = store->data;
-		list[1] = (struct global_curl_info *)&global_curl_info;
+		list[1] = &global_curl_info;
 	}
 
 	for (i = 0; i < 2; i++) {




More information about the asterisk-commits mailing list