Fix compiler warnings.
authorErik de Castro Lopo <erikd@mega-nerd.com>
Wed, 1 Feb 2012 08:58:09 +0000 (19:58 +1100)
committerErik de Castro Lopo <erikd@mega-nerd.com>
Wed, 1 Feb 2012 08:58:09 +0000 (19:58 +1100)
src/flac/encode.c
src/libFLAC/lpc.c
src/share/replaygain_analysis/replaygain_analysis.c
src/test_grabbag/cuesheet/main.c

index 19f79da..dafa105 100644 (file)
@@ -275,7 +275,6 @@ static FLAC__bool get_sample_info_wave(EncoderSession *e, encode_options_t optio
                        FLAC__uint16 x;
                        FLAC__uint32 xx, data_bytes;
                        FLAC__uint16 wFormatTag; /* wFormatTag word from the 'fmt ' chunk */
-                       unsigned block_align;
 
                        if(got_fmt_chunk) {
                                flac__utils_printf(stderr, 1, "%s: ERROR: file has multiple 'fmt ' chunks\n", e->inbasefilename);
@@ -368,7 +367,7 @@ static FLAC__bool get_sample_info_wave(EncoderSession *e, encode_options_t optio
                        /* block align */
                        if(!read_uint16(e->fin, /*big_endian=*/false, &x, e->inbasefilename))
                                return false;
-                       block_align = (unsigned)x;
+
                        /* bits per sample */
                        if(!read_uint16(e->fin, /*big_endian=*/false, &x, e->inbasefilename))
                                return false;
index 9b18887..3070b8e 100644 (file)
@@ -112,7 +112,7 @@ void FLAC__lpc_compute_autocorrelation(const FLAC__real data[], unsigned data_le
 void FLAC__lpc_compute_lp_coefficients(const FLAC__real autoc[], unsigned *max_order, FLAC__real lp_coeff[][FLAC__MAX_LPC_ORDER], FLAC__double error[])
 {
        unsigned i, j;
-       FLAC__double r, err, ref[FLAC__MAX_LPC_ORDER], lpc[FLAC__MAX_LPC_ORDER];
+       FLAC__double r, err, lpc[FLAC__MAX_LPC_ORDER];
 
        FLAC__ASSERT(0 != max_order);
        FLAC__ASSERT(0 < *max_order);
@@ -126,7 +126,6 @@ void FLAC__lpc_compute_lp_coefficients(const FLAC__real autoc[], unsigned *max_o
                r = -autoc[i+1];
                for(j = 0; j < i; j++)
                        r -= lpc[j] * autoc[i-j];
-               ref[i] = (r/=err);
 
                /* Update LPC coefficients and total error. */
                lpc[i]=r;
index 35f29c0..5b61716 100644 (file)
@@ -147,13 +147,13 @@ static unsigned long    totsamp;
 static double           lsum;
 static double           rsum;
 static int              freqindex;
-#ifndef __sun
+#if 0
 static Uint32_t  A [(size_t)(STEPS_per_dB * MAX_dB)];
 static Uint32_t  B [(size_t)(STEPS_per_dB * MAX_dB)];
 #else
 /* [JEC] Solaris Forte compiler doesn't like float calc in array indices */
-static Uint32_t  A [12000];
-static Uint32_t  B [12000];
+static Uint32_t  A [120 * 100];
+static Uint32_t  B [120 * 100];
 #endif
 
 /* for each filter:
index b06e2e6..35506f8 100644 (file)
@@ -111,7 +111,7 @@ static int do_cuesheet(const char *infilename, unsigned sample_rate, FLAC__bool
 int main(int argc, char *argv[])
 {
        FLAC__uint64 lead_out_offset;
-       unsigned sample_rate;
+       unsigned sample_rate = 48000;
        FLAC__bool is_cdda = false;
        const char *usage = "usage: test_cuesheet cuesheet_file lead_out_offset [ [ sample_rate ] cdda ]\n";