]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Constify __ao2_ref_debug in astobj2
authorMatthew Jordan <mjordan@digium.com>
Wed, 12 Sep 2012 15:42:35 +0000 (15:42 +0000)
committerMatthew Jordan <mjordan@digium.com>
Wed, 12 Sep 2012 15:42:35 +0000 (15:42 +0000)
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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@372959 65c4cc65-6c06-0410-ace0-fbb531ad65f3

include/asterisk/astobj2.h
main/astobj2.c

index 21dc60611b2b7eb92fdc75c7eb4dee183c475e67..0fd500c0233114bab642ea6979b1597b790969d4 100644 (file)
@@ -462,7 +462,7 @@ void *__ao2_alloc(const size_t data_size, ao2_destructor_fn destructor_fn);
 
 #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);
 
 /*! @} */
index a63c2dc6cd0fdac680150a81a1a62d7df3d77cf3..02fff97f223123a7f1f04baee24b456488b6ff32 100644 (file)
@@ -207,7 +207,7 @@ void *ao2_object_get_lockaddr(void *obj)
  */
 
 
-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);