From 9f64905d4e2fe7372cc574338e50579455c11602 Mon Sep 17 00:00:00 2001 From: Russell Bryant Date: Fri, 21 Sep 2007 14:40:10 +0000 Subject: 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: https://origsvn.digium.com/svn/asterisk/trunk@83433 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- main/channel.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'main/channel.c') diff --git a/main/channel.c b/main/channel.c index 83389a721..d8a137ec0 100644 --- a/main/channel.c +++ b/main/channel.c @@ -1545,13 +1545,13 @@ void ast_deactivate_generator(struct ast_channel *chan) ast_channel_unlock(chan); } -static int generator_force(void *data) +static int generator_force(const void *data) { /* Called if generator doesn't have data */ void *tmp; int res; int (*generate)(struct ast_channel *chan, void *tmp, int datalen, int samples); - struct ast_channel *chan = data; + struct ast_channel *chan = (struct ast_channel *)data; tmp = chan->generatordata; chan->generatordata = NULL; generate = chan->generator->generate; @@ -1971,7 +1971,7 @@ int ast_waitfordigit(struct ast_channel *c, int ms) return ast_waitfordigit_full(c, ms, -1, -1); } -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) { int res = -1; #ifdef HAVE_ZAPTEL @@ -2182,7 +2182,7 @@ static struct ast_frame *__ast_read(struct ast_channel *chan, int dropaudio) ioctl(chan->timingfd, ZT_TIMERACK, &blah); if (chan->timingfunc) { /* save a copy of func/data before unlocking the channel */ - int (*func)(void *) = chan->timingfunc; + int (*func)(const void *) = chan->timingfunc; void *data = chan->timingdata; ast_channel_unlock(chan); func(data); -- cgit v1.2.3