1
0
Fork 0

Clang warning fixes for IAXClient lib.

This commit is contained in:
James Turner 2016-01-12 22:44:51 -06:00
parent 6f09b9e31e
commit 1e7b6f9b7a
5 changed files with 12 additions and 8 deletions

View file

@ -49,7 +49,7 @@ void gsm_debug_longwords P4( (name, from, to, ptr),
fprintf( stderr, "%s [%d .. %d]: ", name, from, to );
while (from <= to) {
fprintf(stderr, "%d ", ptr[ from ] );
fprintf(stderr, "%ld ", ptr[ from ] );
from++;
if (nprinted++ >= 7) {
nprinted = 0;
@ -63,14 +63,14 @@ void gsm_debug_longword P2( (name, value),
char * name,
longword value )
{
fprintf(stderr, "%s: %d\n", name, (long)value );
fprintf(stderr, "%s: %ld\n", name, (long)value );
}
void gsm_debug_word P2( (name, value),
char * name,
word value )
{
fprintf(stderr, "%s: %d\n", name, (long)value);
fprintf(stderr, "%s: %ld\n", name, (long)value);
}
#endif

View file

@ -4,7 +4,7 @@
* details. THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE.
*/
static char const ident[] = "$Header$";
//static char const ident[] = "$Header$";
#include "config.h"

View file

@ -86,7 +86,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

@ -623,7 +623,7 @@ static int calc_timestamp(struct iax_session *session, unsigned int ts, struct a
#ifdef USE_VOICE_TS_PREDICTION
/* If we haven't most recently sent silence, and we're
* close in time, use predicted time */
if(session->notsilenttx && abs(ms - session->nextpred) <= 240) {
if(session->notsilenttx && (ms - session->nextpred) <= 240) {
/* Adjust our txcore, keeping voice and non-voice
* synchronized */
add_ms(&session->offset, (int)(ms - session->nextpred)/10);
@ -665,7 +665,7 @@ static int calc_timestamp(struct iax_session *session, unsigned int ts, struct a
if (genuine) {
if ((unsigned int)ms <= session->lastsent)
ms = session->lastsent + 3;
} else if (abs(ms - session->lastsent) <= 240) {
} else if ((ms - session->lastsent) <= 240) {
ms = session->lastsent + 3;
}

View file

@ -91,6 +91,7 @@ static inline void spectral_mul_accum(float *X, float *Y, float *acc, int N)
acc[i] += X[i]*Y[i];
}
#if 0 // unused so removing a warning
/** Compute cross-power spectrum of a half-complex (packed) vector with conjugate */
static inline void spectral_mul_conj(float *X, float *Y, float *prod, int N)
{
@ -103,7 +104,7 @@ static inline void spectral_mul_conj(float *X, float *Y, float *prod, int N)
}
prod[i] = X[i]*Y[i];
}
#endif
/** Compute weighted cross-power spectrum of a half-complex (packed) vector with conjugate */
static inline void weighted_spectral_mul_conj(float *w, float *X, float *Y, float *prod, int N)