[asterisk-commits] rmudgett: trunk r330379 - /trunk/main/astobj2.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat Jul 30 19:19:15 CDT 2011


Author: rmudgett
Date: Sat Jul 30 19:19:11 2011
New Revision: 330379

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=330379
Log:
Fixed compiler warning and a couple prototype mismatches.

Modified:
    trunk/main/astobj2.c

Modified: trunk/main/astobj2.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/astobj2.c?view=diff&rev=330379&r1=330378&r2=330379
==============================================================================
--- trunk/main/astobj2.c (original)
+++ trunk/main/astobj2.c Sat Jul 30 19:19:11 2011
@@ -770,16 +770,15 @@
 	}
 }
 
-void *__ao2_callback_debug(struct ao2_container *c,
-			   const enum search_flags flags,
-			   ao2_callback_fn *cb_fn, void *arg,
-			   char *tag, char *file, int line, const char *funcname)
+void *__ao2_callback_debug(struct ao2_container *c, enum search_flags flags,
+	ao2_callback_fn *cb_fn, void *arg, char *tag, char *file, int line,
+	const char *funcname)
 {
 	return internal_ao2_callback(c,flags, cb_fn, arg, NULL, DEFAULT, tag, file, line, funcname);
 }
 
-void *__ao2_callback(struct ao2_container *c, const enum search_flags flags,
-		     ao2_callback_fn *cb_fn, void *arg)
+void *__ao2_callback(struct ao2_container *c, enum search_flags flags,
+	ao2_callback_fn *cb_fn, void *arg)
 {
 	return internal_ao2_callback(c,flags, cb_fn, arg, NULL, DEFAULT, NULL, NULL, 0, NULL);
 }
@@ -803,12 +802,16 @@
  */
 void *__ao2_find_debug(struct ao2_container *c, const void *arg, enum search_flags flags, char *tag, char *file, int line, const char *funcname)
 {
-	return __ao2_callback_debug(c, flags, c->cmp_fn, (void *) arg, tag, file, line, funcname);
+	void *arged = (void *) arg;/* Done to avoid compiler const warning */
+
+	return __ao2_callback_debug(c, flags, c->cmp_fn, arged, tag, file, line, funcname);
 }
 
 void *__ao2_find(struct ao2_container *c, const void *arg, enum search_flags flags)
 {
-	return __ao2_callback(c, flags, c->cmp_fn, (void *) arg);
+	void *arged = (void *) arg;/* Done to avoid compiler const warning */
+
+	return __ao2_callback(c, flags, c->cmp_fn, arged);
 }
 
 /*!




More information about the asterisk-commits mailing list