[asterisk-commits] mjordan: branch 10 r373059 - in /branches/10: ./ include/asterisk/ main/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Sep 14 13:28:44 CDT 2012
Author: mjordan
Date: Fri Sep 14 13:28:40 2012
New Revision: 373059
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=373059
Log:
Constify __ao2_ref_debug in astobj2
When REF_DEBUG is enabled in certain files - most notably ccss.c - the 'tag'
parameter passed to __ao2_ref_debug will be a const char *. The function
currently expects that parameter to not be const. This causes a warning
when compiling, as the const qualifier is being discarded. With dev-mode
enabled, this prevents compiling Asterisk.
This patch makes __ao2_ref_debug's tag and file parameters const.
(closes issue ASTERISK-20408)
Reported by: mjordan
........
Merged revisions 372959 from http://svn.asterisk.org/svn/asterisk/branches/1.8
Modified:
branches/10/ (props changed)
branches/10/include/asterisk/astobj2.h
branches/10/main/astobj2.c
Propchange: branches/10/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.
Modified: branches/10/include/asterisk/astobj2.h
URL: http://svnview.digium.com/svn/asterisk/branches/10/include/asterisk/astobj2.h?view=diff&rev=373059&r1=373058&r2=373059
==============================================================================
--- branches/10/include/asterisk/astobj2.h (original)
+++ branches/10/include/asterisk/astobj2.h Fri Sep 14 13:28:40 2012
@@ -462,7 +462,7 @@
#endif
-int __ao2_ref_debug(void *o, int delta, char *tag, char *file, int line, const char *funcname);
+int __ao2_ref_debug(void *o, int delta, const char *tag, const char *file, int line, const char *funcname);
int __ao2_ref(void *o, int delta);
/*! @} */
Modified: branches/10/main/astobj2.c
URL: http://svnview.digium.com/svn/asterisk/branches/10/main/astobj2.c?view=diff&rev=373059&r1=373058&r2=373059
==============================================================================
--- branches/10/main/astobj2.c (original)
+++ branches/10/main/astobj2.c Fri Sep 14 13:28:40 2012
@@ -207,7 +207,7 @@
*/
-int __ao2_ref_debug(void *user_data, const int delta, char *tag, char *file, int line, const char *funcname)
+int __ao2_ref_debug(void *user_data, const int delta, const char *tag, const char *file, int line, const char *funcname)
{
struct astobj2 *obj = INTERNAL_OBJ(user_data);
More information about the asterisk-commits
mailing list