Adjusting/fixing warnings
This commit is contained in:
parent
2b35de9164
commit
a82dfdd240
12 changed files with 24 additions and 28 deletions
|
@ -109,7 +109,8 @@ AC_ARG_ENABLE(static-modes, [ --enable-static-modes],
|
|||
fi])
|
||||
|
||||
if test $ac_cv_c_compiler_gnu = yes ; then
|
||||
CFLAGS="$CFLAGS -fvisibility=hidden -W -Wstrict-prototypes -Wmissing-prototypes -Wall -Waggregate-return -Wcast-align -Wcast-qual -Wnested-externs -Wshadow -Wno-parentheses"
|
||||
CFLAGS="$CFLAGS -fvisibility=hidden -W -Wstrict-prototypes -Wall -Wextra -Wcast-align -Wnested-externs -Wshadow -Wno-parentheses -Wno-unused-parameter -Wno-sign-compare"
|
||||
#CFLAGS="$CFLAGS -fvisibility=hidden -W -Wstrict-prototypes -Wmissing-prototypes -Wall -Waggregate-return -Wcast-align -Wcast-qual -Wnested-externs -Wshadow -Wno-parentheses"
|
||||
fi
|
||||
|
||||
AC_CHECK_SIZEOF(short)
|
||||
|
|
|
@ -83,10 +83,10 @@ static inline celt_word16_t amp2dB(celt_ener_t amp)
|
|||
|
||||
static const celt_word16_t base_resolution = QCONST16(6.f,8);
|
||||
|
||||
static void quant_energy_mono(const CELTMode *m, celt_ener_t *eBands, celt_word16_t *oldEBands, int budget, ec_enc *enc)
|
||||
static void quant_energy_mono(const CELTMode *m, celt_ener_t *eBands, celt_word16_t *oldEBands, unsigned budget, ec_enc *enc)
|
||||
{
|
||||
int i;
|
||||
int bits;
|
||||
unsigned bits;
|
||||
celt_word16_t prev = 0;
|
||||
celt_word16_t coef = m->ePredCoef;
|
||||
celt_word16_t beta;
|
||||
|
@ -162,10 +162,10 @@ static void quant_energy_mono(const CELTMode *m, celt_ener_t *eBands, celt_word1
|
|||
RESTORE_STACK;
|
||||
}
|
||||
|
||||
static void unquant_energy_mono(const CELTMode *m, celt_ener_t *eBands, celt_word16_t *oldEBands, int budget, ec_dec *dec)
|
||||
static void unquant_energy_mono(const CELTMode *m, celt_ener_t *eBands, celt_word16_t *oldEBands, unsigned budget, ec_dec *dec)
|
||||
{
|
||||
int i;
|
||||
int bits;
|
||||
unsigned bits;
|
||||
celt_word16_t prev = 0;
|
||||
celt_word16_t coef = m->ePredCoef;
|
||||
/* The .7 is a heuristic */
|
||||
|
|
|
@ -243,7 +243,6 @@ void alg_quant(celt_norm_t *X, celt_mask_t *W, int N, int K, const celt_norm_t *
|
|||
|
||||
if (score>nbest[Lupdate-1]->score)
|
||||
{
|
||||
int k;
|
||||
int id = Lupdate-1;
|
||||
struct NBest *tmp_best;
|
||||
|
||||
|
@ -376,7 +375,6 @@ void intra_prediction(celt_norm_t *x, celt_mask_t *W, int N, int K, celt_norm_t
|
|||
|
||||
for (i=0;i<max_pos*B;i+=B)
|
||||
{
|
||||
int j;
|
||||
celt_word32_t xy=0, yy=0;
|
||||
celt_word32_t score;
|
||||
for (j=0;j<N;j++)
|
||||
|
|
|
@ -26,7 +26,6 @@ int main(int _argc,char **_argv){
|
|||
int x2[MMAX];
|
||||
int s2[MMAX];
|
||||
int y[NMAX];
|
||||
int j;
|
||||
int k;
|
||||
cwrsi(n,m,i,x,s);
|
||||
/*printf("%6u of %u:",i,nc);*/
|
||||
|
|
|
@ -27,7 +27,6 @@ int main(int _argc,char **_argv){
|
|||
int x2[MMAX];
|
||||
int s2[MMAX];
|
||||
int y[NMAX];
|
||||
int j;
|
||||
int k;
|
||||
cwrsi64(n,m,i,x,s);
|
||||
/*printf("%llu of %llu:",i,nc);
|
||||
|
|
|
@ -80,7 +80,7 @@ int main(int _argc,char **_argv){
|
|||
}
|
||||
sym64=ec_dec_uint64(&dec,(ec_uint64)ft<<30);
|
||||
if(sym64!=((ec_uint64)i<<30|i)){
|
||||
fprintf(stderr,"Decoded %lli instead of %lli with ft of %lli.\n",sym64,
|
||||
fprintf(stderr,"Decoded %lu instead of %lu with ft of %lu.\n",sym64,
|
||||
(ec_uint64)i<<30|i,(ec_uint64)ft<<30);
|
||||
ret=-1;
|
||||
}
|
||||
|
@ -95,7 +95,7 @@ int main(int _argc,char **_argv){
|
|||
}
|
||||
sym64=ec_dec_bits64(&dec,ftb+30);
|
||||
if(sym64!=((ec_uint64)i<<30|i)){
|
||||
fprintf(stderr,"Decoded %lli instead of %lli with ftb of %i.\n",
|
||||
fprintf(stderr,"Decoded %lu instead of %lu with ftb of %i.\n",
|
||||
sym64,(ec_uint64)i<<30|i,ftb+30);
|
||||
ret=-1;
|
||||
}
|
||||
|
@ -136,7 +136,7 @@ int main(int _argc,char **_argv){
|
|||
ec_enc_done(&enc);
|
||||
if ((tell_bits+7)/8 < ec_byte_bytes(&buf))
|
||||
{
|
||||
fprintf (stderr, "tell() lied, there's %d bytes instead of %d\n",
|
||||
fprintf (stderr, "tell() lied, there's %li bytes instead of %d\n",
|
||||
ec_byte_bytes(&buf), (tell_bits+7)/8);
|
||||
ret=-1;
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#include <stdlib.h>
|
||||
#include "laplace.h"
|
||||
|
||||
int main()
|
||||
int main(void)
|
||||
{
|
||||
int i;
|
||||
int ret = 0;
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
int ret = 0;
|
||||
|
||||
void testdiv()
|
||||
void testdiv(void)
|
||||
{
|
||||
celt_int32_t i;
|
||||
for (i=-327670;i<=327670;i++)
|
||||
|
@ -37,7 +37,7 @@ void testdiv()
|
|||
}
|
||||
}
|
||||
|
||||
void testsqrt()
|
||||
void testsqrt(void)
|
||||
{
|
||||
celt_int32_t i;
|
||||
for (i=1;i<=1000000000;i++)
|
||||
|
@ -55,7 +55,7 @@ void testsqrt()
|
|||
}
|
||||
}
|
||||
|
||||
int main()
|
||||
int main(void)
|
||||
{
|
||||
testdiv();
|
||||
testsqrt();
|
||||
|
|
|
@ -39,7 +39,7 @@ void test_rotation(int N, int K)
|
|||
ret = 1;
|
||||
}
|
||||
|
||||
int main()
|
||||
int main(void)
|
||||
{
|
||||
test_rotation(15, 3);
|
||||
test_rotation(23, 5);
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#include "celt_types.h"
|
||||
#include <stdio.h>
|
||||
|
||||
int main()
|
||||
int main(void)
|
||||
{
|
||||
celt_int16_t i = 1;
|
||||
i <<= 14;
|
||||
|
|
|
@ -247,7 +247,7 @@ FILE *out_file_open(char *outFile, int rate, int *channels)
|
|||
return fout;
|
||||
}
|
||||
|
||||
void usage()
|
||||
void usage(void)
|
||||
{
|
||||
printf ("Usage: celtdec [options] input_file.spx [output_file]\n");
|
||||
printf ("\n");
|
||||
|
@ -274,13 +274,13 @@ void usage()
|
|||
printf ("\n");
|
||||
}
|
||||
|
||||
void version()
|
||||
void version(void)
|
||||
{
|
||||
printf ("celtenc (CELT encoder)\n");
|
||||
printf ("Copyright (C) 2008 Jean-Marc Valin\n");
|
||||
}
|
||||
|
||||
void version_short()
|
||||
void version_short(void)
|
||||
{
|
||||
printf ("celtenc (CELT encoder)\n");
|
||||
printf ("Copyright (C) 2008 Jean-Marc Valin\n");
|
||||
|
@ -291,7 +291,7 @@ static CELTDecoder *process_header(ogg_packet *op, celt_int32_t enh_enabled, cel
|
|||
CELTDecoder *st;
|
||||
CELTHeader header;
|
||||
|
||||
celt_header_from_packet((char*)op->packet, op->bytes, &header);
|
||||
celt_header_from_packet(op->packet, op->bytes, &header);
|
||||
|
||||
if (header.nb_channels>2 || header.nb_channels<1)
|
||||
{
|
||||
|
@ -348,7 +348,6 @@ int main(int argc, char **argv)
|
|||
int frame_size=0, granule_frame_size=0;
|
||||
void *st=NULL;
|
||||
CELTMode *mode=NULL;
|
||||
unsigned char bits[1000];
|
||||
int packet_count=0;
|
||||
int stream_init = 0;
|
||||
int quiet = 0;
|
||||
|
@ -382,7 +381,7 @@ int main(int argc, char **argv)
|
|||
int rate=0;
|
||||
int extra_headers=0;
|
||||
int wav_format=0;
|
||||
int lookahead;
|
||||
int lookahead=0;
|
||||
int celt_serialno = -1;
|
||||
int firstpacket = 1;
|
||||
|
||||
|
@ -487,7 +486,7 @@ int main(int argc, char **argv)
|
|||
while (1)
|
||||
{
|
||||
char *data;
|
||||
int i, j, nb_read;
|
||||
int i, nb_read;
|
||||
/*Get the ogg buffer for writing*/
|
||||
data = ogg_sync_buffer(&oy, 200);
|
||||
/*Read bitstream from input file*/
|
||||
|
|
|
@ -182,19 +182,19 @@ void add_fisbone_packet (ogg_stream_state *os, celt_int32_t serialno, CELTHeader
|
|||
add_fisbone_to_stream(os, &fp);
|
||||
}
|
||||
|
||||
void version()
|
||||
void version(void)
|
||||
{
|
||||
printf ("celtenc (CELT encoder)\n");
|
||||
printf ("Copyright (C) 2008 Jean-Marc Valin\n");
|
||||
}
|
||||
|
||||
void version_short()
|
||||
void version_short(void)
|
||||
{
|
||||
printf ("celtenc (CELT encoder)\n");
|
||||
printf ("Copyright (C) 2008 Jean-Marc Valin\n");
|
||||
}
|
||||
|
||||
void usage()
|
||||
void usage(void)
|
||||
{
|
||||
printf ("Usage: celtenc [options] input_file output_file\n");
|
||||
printf ("\n");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue