diff options
author | Shaun Ruffell <sruffell@digium.com> | 2010-09-29 21:32:55 +0000 |
---|---|---|
committer | Shaun Ruffell <sruffell@digium.com> | 2010-09-29 21:32:55 +0000 |
commit | 7f4bb3298186ae9749f86b60d7059c2b64d59e4a (patch) | |
tree | 80b5703309a5672f584f42a5fa8915063e4225dc /drivers/dahdi/dahdi_echocan_mg2.c | |
parent | c44372ac1643221cb4b42e25726bdeaa57371bc3 (diff) |
dahdi: Fix 'void *' pointer arithmetic warnings.
(closes issue #15927)
Reported by: Max Khon
Patches:
dahdi_echocan2.diff uploaded by Max Khon (license 884)
void2.diff uploaded by Max Khon (license 884)
Signed-off-by: Kinsey Moore <kmoore@digium.com>
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9420 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'drivers/dahdi/dahdi_echocan_mg2.c')
-rw-r--r-- | drivers/dahdi/dahdi_echocan_mg2.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/dahdi/dahdi_echocan_mg2.c b/drivers/dahdi/dahdi_echocan_mg2.c index 5dfd882..b2a102d 100644 --- a/drivers/dahdi/dahdi_echocan_mg2.c +++ b/drivers/dahdi/dahdi_echocan_mg2.c @@ -307,7 +307,7 @@ static inline short get_cc_s(echo_can_cb_s *cb, int pos) static inline void init_cc(struct ec_pvt *pvt, int N, int maxy, int maxu) { - void *ptr = pvt; + char *ptr = (char *) pvt; unsigned long tmp; /* Double-word align past end of state */ @@ -322,15 +322,15 @@ static inline void init_cc(struct ec_pvt *pvt, int N, int maxy, int maxu) pvt->beta2_i = DEFAULT_BETA1_I; /* Allocate coefficient memory */ - pvt->a_i = ptr; + pvt->a_i = (int *) ptr; ptr += (sizeof(int) * pvt->N_d); - pvt->a_s = ptr; + pvt->a_s = (short *) ptr; ptr += (sizeof(short) * pvt->N_d); /* Allocate backup memory */ - pvt->b_i = ptr; + pvt->b_i = (int *) ptr; ptr += (sizeof(int) * pvt->N_d); - pvt->c_i = ptr; + pvt->c_i = (int *) ptr; ptr += (sizeof(int) * pvt->N_d); /* Reset Y circular buffer (short version) */ @@ -387,7 +387,7 @@ static void echo_can_free(struct dahdi_chan *chan, struct dahdi_echocan_state *e } #ifdef DC_NORMALIZE -short inline dc_removal(int *dc_estimate, short samp) +static inline short dc_removal(int *dc_estimate, short samp) { *dc_estimate += ((((int)samp << 15) - *dc_estimate) >> 9); return samp - (*dc_estimate >> 15); |