diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-09-21 14:40:10 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-09-21 14:40:10 +0000 |
commit | 16927b7f7a7bce25329d1c2be0f31fbd789cb221 (patch) | |
tree | 9799cdd844ef78877a6446a6746e82e0c090bc9a /main/sched.c | |
parent | e935ee6eac3ecb38b704ea2e9c2e86309150ab84 (diff) |
Merged revisions 83432 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r83432 | russell | 2007-09-21 09:37:20 -0500 (Fri, 21 Sep 2007) | 4 lines
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/trunk@83433 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/sched.c')
-rw-r--r-- | main/sched.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/main/sched.c b/main/sched.c index f85c0dca4..a68692db0 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 */ }; @@ -207,7 +207,7 @@ static int sched_settime(struct timeval *tv, int when) return 0; } -int ast_sched_replace_variable(int old_id, struct sched_context *con, int when, ast_sched_cb callback, void *data, int variable) +int ast_sched_replace_variable(int old_id, struct sched_context *con, int when, ast_sched_cb callback, const void *data, int variable) { /* 0 means the schedule item is new; do not delete */ if (old_id > 0) @@ -218,7 +218,7 @@ int ast_sched_replace_variable(int old_id, struct sched_context *con, 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; @@ -251,14 +251,14 @@ int ast_sched_add_variable(struct sched_context *con, int when, ast_sched_cb cal return res; } -int ast_sched_replace(int old_id, struct sched_context *con, int when, ast_sched_cb callback, void *data) +int ast_sched_replace(int old_id, struct sched_context *con, int when, ast_sched_cb callback, const void *data) { if (old_id > -1) ast_sched_del(con, old_id); return ast_sched_add(con, when, callback, data); } -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); } |