diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-09-21 14:37:20 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-09-21 14:37:20 +0000 |
commit | 02c2b2e2c1f00151ac2099ff68efda2ac89271a0 (patch) | |
tree | b76c4146efd5357b7e89db353ccebf4bdefa8e7b /main/sched.c | |
parent | ec43deabe7d576aca83ebbda30dfc0290e38ef3c (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 'main/sched.c')
-rw-r--r-- | main/sched.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/main/sched.c b/main/sched.c index abc5b3da1..04589a018 100644 --- a/main/sched.c +++ b/main/sched.c @@ -56,7 +56,7 @@ struct sched { struct timeval when; /*!< Absolute time event should take place */ int resched; /*!< When to reschedule */ int variable; /*!< Use return value from callback to reschedule */ - void *data; /*!< Data */ + const void *data; /*!< Data */ ast_sched_cb callback; /*!< Callback */ }; @@ -211,7 +211,7 @@ static int sched_settime(struct timeval *tv, int when) /*! \brief * Schedule callback(data) to happen when ms into the future */ -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) { struct sched *tmp; int res = -1; @@ -244,7 +244,7 @@ int ast_sched_add_variable(struct sched_context *con, int when, ast_sched_cb cal return res; } -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) { return ast_sched_add_variable(con, when, callback, data, 0); } |