Eliminate some clang warnings

This commit is contained in:
Steve Underwood 2014-04-30 22:18:46 +08:00
parent c36e63026c
commit bfacd58fa7
7 changed files with 32 additions and 59 deletions

View File

@ -111,12 +111,21 @@ typedef struct
/*! \brief The coefficients for the single bi-quad flat mode filter. */
const sig_tone_flat_coeffs_t *flat;
#if defined(SPANDSP_USE_FIXED_POINT)
/*! \brief Minimum signalling tone to total power ratio, in dB */
int16_t detection_ratio;
/*! \brief Minimum total power for detection in sharp mode, in dB */
int16_t sharp_detection_threshold;
/*! \brief Minimum total power for detection in flat mode, in dB */
int16_t flat_detection_threshold;
#else
/*! \brief Minimum signalling tone to total power ratio, in dB */
float detection_ratio;
/*! \brief Minimum total power for detection in sharp mode, in dB */
float sharp_detection_threshold;
/*! \brief Minimum total power for detection in flat mode, in dB */
float flat_detection_threshold;
#endif
} sig_tone_descriptor_t;
/*!

View File

@ -368,6 +368,13 @@ static const nsf_data_t vendor_20[] =
{NULL, 0, NULL, false, NULL}
};
static const nsf_data_t vendor_61[] =
{
/* Korea */
{"\x00\x7A", 2, "Xerox", false, NULL},
{NULL, 0, NULL, false, NULL}
};
static const nsf_data_t vendor_64[] =
{
/* China (not Lebanon) */
@ -378,13 +385,6 @@ static const nsf_data_t vendor_64[] =
{NULL, 0, NULL, false, NULL}
};
static const nsf_data_t vendor_61[] =
{
/* Korea */
{"\x00\x7A", 2, "Xerox", false, NULL},
{NULL, 0, NULL, false, NULL}
};
static const nsf_data_t vendor_86[] =
{
/* Korea (not Papua New Guinea) */
@ -423,18 +423,11 @@ static const nsf_data_t vendor_86[] =
{NULL, 0, NULL, false, NULL}
};
static const nsf_data_t vendor_bc[] =
{
/* France */
{"\x53\x01", 2, "Minolta", false, NULL},
{NULL, 0, NULL, false, NULL}
};
static const nsf_data_t vendor_ad[] =
{
/* United States (not Tunisia) */
{"\x00\x00", 2, "Pitney Bowes", false, PitneyBowes},
{"\x00\x0C", 2, "Dialogic", false, NULL},
{"\x00\x0C", 2, "Dialogic", false, Dialogic},
{"\x00\x15", 2, "Lexmark", false, Lexmark},
{"\x00\x16", 2, "JetFax", false, JetFax},
{"\x00\x24", 2, "Octel", false, NULL},
@ -475,7 +468,7 @@ static const nsf_data_t vendor_b5[] =
{"\x00\x2A", 2, "STF Tech", false, NULL},
{"\x00\x2C", 2, "HKB", false, NULL},
{"\x00\x2E", 2, "Delrina", false, NULL},
{"\x00\x30", 2, "Dialogic", false, NULL},
{"\x00\x30", 2, "Dialogic", false, Dialogic},
{"\x00\x32", 2, "Applied Synergy", false, NULL},
{"\x00\x34", 2, "Syncro Development", false, NULL},
{"\x00\x36", 2, "Genoa", false, NULL},
@ -534,6 +527,13 @@ static const nsf_data_t vendor_b5[] =
{NULL, 0, NULL, false, NULL}
};
static const nsf_data_t vendor_bc[] =
{
/* France (not Vietnam) */
{"\x53\x01", 2, "Minolta", false, NULL},
{NULL, 0, NULL, false, NULL}
};
static const country_code_t t35_country_codes[255] =
{
{"Japan", vendor_00}, /* 0x00 */
@ -724,7 +724,7 @@ static const country_code_t t35_country_codes[255] =
{"Vanuatu", NULL},
{"Vatican City State", NULL},
{"Venezuela", NULL},
{"Viet Nam", NULL},
{"Viet Nam", vendor_bc},
{"Wallis and Futuna", NULL},
{"Western Samoa", NULL},
{"Yemen (Republic of)", NULL},

View File

@ -213,6 +213,7 @@ static __inline__ uint16_t pack_16(const uint8_t *s)
}
/*- End of function --------------------------------------------------------*/
#if 0
static __inline__ uint32_t pack_32(const uint8_t *s)
{
uint32_t value;
@ -221,6 +222,7 @@ static __inline__ uint32_t pack_32(const uint8_t *s)
return value;
}
/*- End of function --------------------------------------------------------*/
#endif
static __inline__ int unpack_16(uint8_t *s, uint16_t value)
{

View File

@ -118,6 +118,7 @@ static __inline__ int unpack_16(uint8_t *s, uint16_t value)
}
/*- End of function --------------------------------------------------------*/
#if 0
static __inline__ int unpack_32(uint8_t *s, uint32_t value)
{
s[0] = (value >> 24) & 0xFF;
@ -247,6 +248,7 @@ static int t43_create_header(t43_encode_state_t *s, uint8_t data[], size_t len)
return pos;
}
/*- End of function --------------------------------------------------------*/
#endif
SPAN_DECLARE(void) t43_encode_set_options(t43_encode_state_t *s,
uint32_t l0,

View File

@ -158,40 +158,6 @@ static int free_buffers(t4_t6_decode_state_t *s)
}
/*- End of function --------------------------------------------------------*/
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__powerpc__)
static __inline__ int run_length(unsigned int bits)
{
return 7 - top_bit(bits);
}
/*- End of function --------------------------------------------------------*/
#else
static __inline__ int run_length(unsigned int bits)
{
static const uint8_t run_len[256] =
{
8, 7, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, /* 0x00 - 0x0F */
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, /* 0x10 - 0x1F */
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, /* 0x20 - 0x2F */
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, /* 0x30 - 0x3F */
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0x40 - 0x4F */
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0x50 - 0x5F */
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0x60 - 0x6F */
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0x70 - 0x7F */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x80 - 0x8F */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x90 - 0x9F */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0xA0 - 0xAF */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0xB0 - 0xBF */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0xC0 - 0xCF */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0xD0 - 0xDF */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0xE0 - 0xEF */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0xF0 - 0xFF */
};
return run_len[bits];
}
/*- End of function --------------------------------------------------------*/
#endif
static __inline__ void add_run_to_row(t4_t6_decode_state_t *s)
{
if (s->run_length >= 0)

View File

@ -366,6 +366,7 @@ static const char *ascii_to_dtmf[128] =
"*0" /* DEL >> BACK SPACE */
};
#if 0
static const uint8_t txp[] = "1111111111000101011100001101110000010101";
/* XCI is:
@ -546,6 +547,7 @@ static const int automoding_sequences[][6] =
V18_MODE_BELL103
}
};
#endif
static uint16_t encode_baudot(v18_state_t *s, uint8_t ch)
{

View File

@ -136,14 +136,6 @@ static const uint8_t phase_steps[4] =
1, 0, 2, 3
};
static const uint8_t ones[] =
{
0, 1, 1, 2,
1, 2, 2, 3,
1, 2, 2, 3,
2, 3, 3, 4
};
SPAN_DECLARE(float) v22bis_rx_carrier_frequency(v22bis_state_t *s)
{
return dds_frequencyf(s->rx.carrier_phase_rate);