fix various compiler warnings

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5491 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Kevin P. Fleming
2005-04-21 06:30:23 +00:00
parent 1f9ab2380a
commit a729a57ba1
11 changed files with 25 additions and 22 deletions

View File

@@ -151,13 +151,18 @@ static __inline__ short GSM_SUB(short a, short b)
*/
/* Nonportable, but faster: */
#define GSM_ADD(a, b) \
((ulongword)((ltmp = (longword)(a) + (longword)(b)) - MIN_WORD) > \
MAX_WORD - MIN_WORD ? (ltmp > 0 ? MAX_WORD : MIN_WORD) : ltmp)
# define GSM_ADD(a, b) ({ \
register longword ltmp; \
ltmp = (longword) (a) + (longword) (b); \
((ulongword) (ltmp - MIN_WORD) > MAX_WORD - MIN_WORD ? \
(ltmp > 0 ? MAX_WORD : MIN_WORD) : ltmp); \
})
# define GSM_SUB(a, b) \
((ltmp = (longword)(a) - (longword)(b)) >= MAX_WORD \
? MAX_WORD : ltmp <= MIN_WORD ? MIN_WORD : ltmp)
#define GSM_SUB(a, b) ({ \
register longword ltmp; \
ltmp = (longword) (a) - (longword) (b); \
(ltmp >= MAX_WORD ? MAX_WORD : ltmp <= MIN_WORD ? MIN_WORD : ltmp); \
})
#endif

View File

@@ -22,7 +22,6 @@ static void Postprocessing P2((S,s),
{
register int k;
register word msr = S->msr;
register longword ltmp; /* for GSM_ADD */
register word tmp;
for (k = 160; k--; s++) {

View File

@@ -852,7 +852,6 @@ static void Long_term_analysis_filtering P6((bc,Nc,dp,d,dpp,e),
*/
{
register int k;
register longword ltmp;
# undef STEP
# define STEP(BP) \
@@ -921,7 +920,6 @@ void Gsm_Long_Term_Synthesis_Filtering P5((S,Ncr,bcr,erp,drp),
* table 4.3b.
*/
{
register longword ltmp; /* for ADD */
register int k;
word brp, drpp, Nr;

View File

@@ -211,7 +211,6 @@ static void Reflection_coefficients P2( (L_ACF, r),
{
register int i, m, n;
register word temp;
register longword ltmp;
word ACF[9]; /* 0..8 */
word P[ 9]; /* 0..8 */
word K[ 9]; /* 2..8 */
@@ -319,7 +318,6 @@ static void Quantization_and_coding P1((LAR),
)
{
register word temp;
longword ltmp;
/* This procedure needs four tables; the following equations

View File

@@ -46,7 +46,6 @@ void Gsm_Preprocess P3((S, s, so),
word SO;
longword ltmp; /* for ADD */
ulongword utmp; /* for L_ADD */
register int k = 160;
@@ -86,7 +85,10 @@ void Gsm_Preprocess P3((S, s, so),
/* Execution of a 31 bv 16 bits multiplication
*/
{
word msp, lsp;
word msp;
#ifndef __GNUC__
word lsp;
#endif
longword L_s2;
longword L_temp;

View File

@@ -362,7 +362,6 @@ static void APCM_inverse_quantization P4((xMc,mant,exp,xMp),
{
int i;
word temp, temp1, temp2, temp3;
longword ltmp;
assert( mant >= 0 && mant <= 7 );

View File

@@ -30,7 +30,6 @@ static void Decoding_of_the_coded_Log_Area_Ratios P2((LARc,LARpp),
word * LARpp) /* out: decoded .. */
{
register word temp1 /* , temp2 */;
register long ltmp; /* for GSM_ADD */
/* This procedure requires for efficient implementation
* two tables.
@@ -99,7 +98,6 @@ static void Coefficients_0_12 P3((LARpp_j_1, LARpp_j, LARp),
register word * LARp)
{
register int i;
register longword ltmp;
for (i = 1; i <= 8; i++, LARp++, LARpp_j_1++, LARpp_j++) {
*LARp = GSM_ADD( SASR( *LARpp_j_1, 2 ), SASR( *LARpp_j, 2 ));
@@ -113,7 +111,6 @@ static void Coefficients_13_26 P3((LARpp_j_1, LARpp_j, LARp),
register word * LARp)
{
register int i;
register longword ltmp;
for (i = 1; i <= 8; i++, LARpp_j_1++, LARpp_j++, LARp++) {
*LARp = GSM_ADD( SASR( *LARpp_j_1, 1), SASR( *LARpp_j, 1 ));
}
@@ -125,7 +122,6 @@ static void Coefficients_27_39 P3((LARpp_j_1, LARpp_j, LARp),
register word * LARp)
{
register int i;
register longword ltmp;
for (i = 1; i <= 8; i++, LARpp_j_1++, LARpp_j++, LARp++) {
*LARp = GSM_ADD( SASR( *LARpp_j_1, 2 ), SASR( *LARpp_j, 2 ));
@@ -156,7 +152,6 @@ static void LARp_to_rp P1((LARp),
{
register int i;
register word temp;
register longword ltmp;
for (i = 1; i <= 8; i++, LARp++) {