aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-09-21 14:37:20 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-09-21 14:37:20 +0000
commit02c2b2e2c1f00151ac2099ff68efda2ac89271a0 (patch)
treeb76c4146efd5357b7e89db353ccebf4bdefa8e7b /include
parentec43deabe7d576aca83ebbda30dfc0290e38ef3c (diff)
gcc 4.2 has a new set of warnings dealing with cosnt pointers. This set of
changes gets all of Asterisk (minus chan_alsa for now) to compile with gcc 4.2. (closes issue #10774, patch from qwell) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@83432 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include')
-rw-r--r--include/asterisk/channel.h4
-rw-r--r--include/asterisk/sched.h6
2 files changed, 5 insertions, 5 deletions
diff --git a/include/asterisk/channel.h b/include/asterisk/channel.h
index 7035b5746..eaf50d42a 100644
--- a/include/asterisk/channel.h
+++ b/include/asterisk/channel.h
@@ -367,7 +367,7 @@ struct ast_channel {
int oldwriteformat; /*!< Original writer format */
int timingfd; /*!< Timing fd */
- int (*timingfunc)(void *data);
+ int (*timingfunc)(const void *data);
void *timingdata;
enum ast_channel_state _state; /*!< State of line -- Don't write directly, use ast_setstate */
@@ -1135,7 +1135,7 @@ int ast_autoservice_stop(struct ast_channel *chan);
/* If built with zaptel optimizations, force a scheduled expiration on the
timer fd, at which point we call the callback function / data */
-int ast_settimeout(struct ast_channel *c, int samples, int (*func)(void *data), void *data);
+int ast_settimeout(struct ast_channel *c, int samples, int (*func)(const void *data), void *data);
/*! \brief Transfer a channel (if supported). Returns -1 on error, 0 if not supported
and 1 if supported and requested
diff --git a/include/asterisk/sched.h b/include/asterisk/sched.h
index 00dc7a0a2..7489c6377 100644
--- a/include/asterisk/sched.h
+++ b/include/asterisk/sched.h
@@ -55,7 +55,7 @@ void sched_context_destroy(struct sched_context *c);
* \return returns a 0 if it should not be run again, or non-zero if it should be
* rescheduled to run again
*/
-typedef int (*ast_sched_cb)(void *data);
+typedef int (*ast_sched_cb)(const void *data);
#define AST_SCHED_CB(a) ((ast_sched_cb)(a))
/*! \brief Adds a scheduled event
@@ -69,7 +69,7 @@ typedef int (*ast_sched_cb)(void *data);
* \param data data to pass to the callback
* \return Returns a schedule item ID on success, -1 on failure
*/
-int ast_sched_add(struct sched_context *con, int when, ast_sched_cb callback, void *data);
+int ast_sched_add(struct sched_context *con, int when, ast_sched_cb callback, const void *data);
/*!Adds a scheduled event with rescheduling support
* \param con Scheduler context to add
@@ -84,7 +84,7 @@ int ast_sched_add(struct sched_context *con, int when, ast_sched_cb callback, vo
* If callback returns 0, no further events will be re-scheduled
* \return Returns a schedule item ID on success, -1 on failure
*/
-int ast_sched_add_variable(struct sched_context *con, int when, ast_sched_cb callback, void *data, int variable);
+int ast_sched_add_variable(struct sched_context *con, int when, ast_sched_cb callback, const void *data, int variable);
/*! \brief Deletes a scheduled event
* Remove this event from being run. A procedure should not remove its