]> git.mxchange.org Git - flightgear.git/commitdiff
Clang warning fixes for IAXClient lib.
authorJames Turner <zakalawe@mac.com>
Wed, 13 Jan 2016 04:44:51 +0000 (22:44 -0600)
committerJames Turner <zakalawe@mac.com>
Wed, 13 Jan 2016 14:21:56 +0000 (08:21 -0600)
3rdparty/iaxclient/lib/gsm/src/debug.c
3rdparty/iaxclient/lib/gsm/src/gsm_create.c
3rdparty/iaxclient/lib/gsm/src/preprocess.c
3rdparty/iaxclient/lib/libiax2/src/iax.c
3rdparty/iaxclient/lib/libspeex/mdf.c

index 22dfa80827a89d3291e45edc4d6722b28761cf28..e05210428f3ee87732c887e9e0cf5cfbb07ea17d 100644 (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
index a59aa2f2a38335b87ac0d943a5b1787bd3450ae2..e92a8a44b172028f01df84d8359715d862d3786e 100644 (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"
 
index 83c3f6a56672f5fe7a9c1670ab49c55c7eb4b5c4..f845cc248125c529d5aae17f1e714b25d687c0f5 100644 (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;
                
index 2234b2d10d83918b0c3f813dbeb6178ca09d5639..0bfd2e4259fdc65df328c22623a0443dbbb34253 100644 (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;
                }
 
index 7de593643bc21998eb304c1d1902e624c9a0b23f..651454b257fbd252b7d82d91059d9355b71707f6 100644 (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)