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: https://origsvn.digium.com/svn/asterisk/branches/1.4@83432 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Russell Bryant
2007-09-21 14:37:20 +00:00
parent 9ffb2fe0cf
commit d6b8fb4dc0
22 changed files with 142 additions and 144 deletions

View File

@@ -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);
}