From 5e0b3fa077773e2cff5c838fdcc815ae6cae91f3 Mon Sep 17 00:00:00 2001 From: Steve Underwood Date: Mon, 24 Feb 2014 12:50:41 +0800 Subject: [PATCH] Fixes for things picked up by clang compilation --- libs/spandsp/src/sig_tone.c | 18 ++++++++++++++++++ libs/spandsp/src/spandsp/private/t31.h | 2 +- libs/spandsp/src/spandsp/v17rx.h | 2 +- libs/spandsp/src/v17rx.c | 2 +- 4 files changed, 21 insertions(+), 3 deletions(-) diff --git a/libs/spandsp/src/sig_tone.c b/libs/spandsp/src/sig_tone.c index e40d39ac37..1b30d8e583 100644 --- a/libs/spandsp/src/sig_tone.c +++ b/libs/spandsp/src/sig_tone.c @@ -154,9 +154,15 @@ static const sig_tone_descriptor_t sig_tones[3] = }, &flat_coeffs[NOTCH_COEFF_SET_2280HZ], +#if defined(SPANDSP_USE_FIXED_POINT) + 13, + -30, + -30 +#else 13.0f, -30.0f, -30.0f +#endif }, { /* 2600Hz (e.g. many US protocols) */ @@ -176,9 +182,15 @@ static const sig_tone_descriptor_t sig_tones[3] = }, NULL, +#if defined(SPANDSP_USE_FIXED_POINT) + 16, + -30, + -30 +#else 15.6f, -30.0f, -30.0f +#endif }, { /* 2400Hz/2600Hz (e.g. SS5 and SS5bis) */ @@ -198,9 +210,15 @@ static const sig_tone_descriptor_t sig_tones[3] = }, NULL, +#if defined(SPANDSP_USE_FIXED_POINT) + 16, + -30, + -30 +#else 15.6f, -30.0f, -30.0f +#endif } }; diff --git a/libs/spandsp/src/spandsp/private/t31.h b/libs/spandsp/src/spandsp/private/t31.h index 1f7de41f99..2bfed82d0b 100644 --- a/libs/spandsp/src/spandsp/private/t31.h +++ b/libs/spandsp/src/spandsp/private/t31.h @@ -140,7 +140,7 @@ typedef struct /*! \brief True if we are using ECM mode. This is used to select HDLC faking, necessary with clunky class 1 modems. */ - bool ecm_mode; + int ecm_mode; /*! \brief Counter for trailing non-ECM bytes, used to flush out the far end's modem. */ int non_ecm_trailer_bytes; diff --git a/libs/spandsp/src/spandsp/v17rx.h b/libs/spandsp/src/spandsp/v17rx.h index 74c4b1dd8e..d99674ddd5 100644 --- a/libs/spandsp/src/spandsp/v17rx.h +++ b/libs/spandsp/src/spandsp/v17rx.h @@ -241,7 +241,7 @@ SPAN_DECLARE(v17_rx_state_t *) v17_rx_init(v17_rx_state_t *s, int bit_rate, put_ \param bit_rate The bit rate of the modem. Valid values are 7200, 9600, 12000 and 14400. \param short_train True if a short training sequence is expected. \return 0 for OK, -1 for bad parameter */ -SPAN_DECLARE(int) v17_rx_restart(v17_rx_state_t *s, int bit_rate, bool short_train); +SPAN_DECLARE(int) v17_rx_restart(v17_rx_state_t *s, int bit_rate, int short_train); /*! Release a V.17 modem receive context. \brief Release a V.17 modem receive context. diff --git a/libs/spandsp/src/v17rx.c b/libs/spandsp/src/v17rx.c index 85d72d0ed6..4b61af1409 100644 --- a/libs/spandsp/src/v17rx.c +++ b/libs/spandsp/src/v17rx.c @@ -1392,7 +1392,7 @@ SPAN_DECLARE(logging_state_t *) v17_rx_get_logging_state(v17_rx_state_t *s) } /*- End of function --------------------------------------------------------*/ -SPAN_DECLARE(int) v17_rx_restart(v17_rx_state_t *s, int bit_rate, bool short_train) +SPAN_DECLARE(int) v17_rx_restart(v17_rx_state_t *s, int bit_rate, int short_train) { int i;