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
This commit is contained in:
Russell Bryant
2007-09-21 14:40:10 +00:00
parent 78a94595f6
commit 9f64905d4e
20 changed files with 140 additions and 142 deletions

View File

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