changeset 2032:6e90cb04b855

* include/cyg_ass.h: Fixed a function prototype so that gcc4 does not give warnings. A const void makes no sense. * src/*.cxx (cyg_check_func_ptr): match the implementation to the prototype.
author asl
date Sat, 30 Jul 2005 11:48:54 +0000
parents 9decd7239b86
children b2e76f0a78c3
files packages/infra/current/ChangeLog packages/infra/current/include/cyg_ass.h packages/infra/current/src/buffer.cxx packages/infra/current/src/fancy.cxx packages/infra/current/src/null.cxx
diffstat 5 files changed, 13 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/packages/infra/current/ChangeLog
+++ b/packages/infra/current/ChangeLog
@@ -1,3 +1,10 @@
+2005-07-29  Andrew Lunn  <andrew.lunn@ascom.ch>
+
+	* include/cyg_ass.h: Fixed a function prototype so that
+	gcc4 does not give warnings. A const void makes no sense.
+	* src/*.cxx (cyg_check_func_ptr): match the implementation to the
+	prototype.
+
 2005-06-27  Andrew Lunn  <andrew.lunn@ascom.ch>
 
 	* include/cyg_type.h: Added CYGBLD_ATTRIB_USED so that we can
--- a/packages/infra/current/include/cyg_ass.h
+++ b/packages/infra/current/include/cyg_ass.h
@@ -157,7 +157,7 @@ cyg_assert_msg( const char *psz_func, co
 // regions.
 
 externC cyg_bool cyg_check_data_ptr(const void *ptr);
-externC cyg_bool cyg_check_func_ptr(const void (*ptr)(void));
+externC cyg_bool cyg_check_func_ptr(void (*ptr)(void));
 
 #ifdef CYGDBG_USE_ASSERTS
 
@@ -169,7 +169,7 @@ externC cyg_bool cyg_check_func_ptr(cons
 
 # define CYG_CHECK_FUNC_PTR( _ptr_, _msg_ )             \
         CYG_MACRO_START                                 \
-        if( !cyg_check_func_ptr((const void (*)(void))(_ptr_))) \
+        if( !cyg_check_func_ptr((void (*)(void))(_ptr_))) \
            CYG_ASSERT_DOCALL( _msg_ );                   \
         CYG_MACRO_END
         
@@ -181,7 +181,7 @@ externC cyg_bool cyg_check_func_ptr(cons
 
 # define CYG_CHECK_FUNC_PTRC( _ptr_ )                       \
          CYG_MACRO_START                                    \
-         if ( !cyg_check_func_ptr((const void (*)(void))(_ptr_))) \
+         if ( !cyg_check_func_ptr((void (*)(void))(_ptr_))) \
              CYG_ASSERT_DOCALL("function pointer (" #_ptr_ ") is valid"); \
          CYG_MACRO_END
 
--- a/packages/infra/current/src/buffer.cxx
+++ b/packages/infra/current/src/buffer.cxx
@@ -772,7 +772,7 @@ externC cyg_bool cyg_check_data_ptr(cons
     return true;
 }
 
-externC cyg_bool cyg_check_func_ptr(const void (*ptr)(void))
+externC cyg_bool cyg_check_func_ptr(void (*ptr)(void))
 {
     unsigned long p = (unsigned long)ptr;
     
--- a/packages/infra/current/src/fancy.cxx
+++ b/packages/infra/current/src/fancy.cxx
@@ -643,7 +643,7 @@ externC cyg_bool cyg_check_data_ptr(cons
     return true;
 }
 
-externC cyg_bool cyg_check_func_ptr(const void (*ptr)(void))
+externC cyg_bool cyg_check_func_ptr(void (*ptr)(void))
 {
     unsigned long p = (unsigned long)ptr;
     
--- a/packages/infra/current/src/null.cxx
+++ b/packages/infra/current/src/null.cxx
@@ -166,7 +166,7 @@ externC cyg_bool cyg_check_data_ptr(cons
     return true;
 }
 
-externC cyg_bool cyg_check_func_ptr(const void (*ptr)(void))
+externC cyg_bool cyg_check_func_ptr(void (*ptr)(void))
 {
     unsigned long p = (unsigned long)ptr;