freeswitch/spandsp

Warnings: Values cast to wrong type?

Opened this issue · 0 comments

This didn't kill the build, but wanted to bring up these casting issues for tracking and resolution.

17rx.c: In function ‘v17_rx’:
v17rx.c:1339:68: warning: passing argument 2 of ‘vec_circular_dot_prodf’ from incompatible pointer type [-Wincompatible-pointer-types]
 1339 |         v = vec_circular_dot_prodf(s->rrc_filter, rx_pulseshaper_re[step], V17_RX_FILTER_STEPS, s->rrc_filter_step);
      |                                                   ~~~~~~~~~~~~~~~~~^~~~~~
      |                                                                    |
      |                                                                    const int16_t * {aka const short int *}
In file included from v17rx.c:57:
spandsp/vector_float.h:184:73: note: expected ‘const float *’ but argument is of type ‘const int16_t *’ {aka ‘const short int *’}
  184 | SPAN_DECLARE(float) vec_circular_dot_prodf(const float x[], const float y[], int n, int pos);
      |                                                             ~~~~~~~~~~~~^~~
v17rx.c:1379:72: warning: passing argument 2 of ‘vec_circular_dot_prodf’ from incompatible pointer type [-Wincompatible-pointer-types]
 1379 |             v = vec_circular_dot_prodf(s->rrc_filter, rx_pulseshaper_im[step], V17_RX_FILTER_STEPS, s->rrc_filter_step);
      |                                                       ~~~~~~~~~~~~~~~~~^~~~~~
      |                                                                        |
      |                                                                        const int16_t * {aka const short int *}
In file included from v17rx.c:57:
spandsp/vector_float.h:184:73: note: expected ‘const float *’ but argument is of type ‘const int16_t *’ {aka ‘const short int *’}
  184 | SPAN_DECLARE(float) vec_circular_dot_prodf(const float x[], const float y[], int n, int pos);
      |                                                             ~~~~~~~~~~~~^~~