Commit 944ed8b3 authored by Segher Boessenkool's avatar Segher Boessenkool
Browse files

Kill some warnings. Oh, and make examples compile again under

CodeWarrior.  Oops.

svn path=/trunk/vorbis/; revision=2862
parent 8a1271e8
......@@ -11,7 +11,7 @@
********************************************************************
function: simple example decoder
last mod: $Id: decoder_example.c,v 1.23 2001/12/18 01:07:53 segher Exp $
last mod: $Id: decoder_example.c,v 1.24 2001/12/19 23:13:32 segher Exp $
********************************************************************/
......@@ -62,9 +62,12 @@ int main(){
#endif
#if defined(macintosh) && defined(__MWERKS__)
argc = ccommand(&argv); /* get a "command line" from the Mac user */
/* this also lets the user set stdin and stdout */
{
int argc;
char **argv;
argc=ccommand(&argv); /* get a "command line" from the Mac user */
/* this also lets the user set stdin and stdout */
}
#endif
/********** Decode setup ************/
......
......@@ -11,7 +11,7 @@
********************************************************************
function: basic codebook pack/unpack/code/decode operations
last mod: $Id: codebook.c,v 1.32 2001/12/16 04:15:46 xiphmont Exp $
last mod: $Id: codebook.c,v 1.33 2001/12/19 23:13:33 segher Exp $
********************************************************************/
......@@ -222,7 +222,7 @@ int vorbis_staticbook_unpack(oggpack_buffer *opb,static_codebook *s){
s->q_sequencep=oggpack_read(opb,1);
{
int quantvals;
int quantvals=0;
switch(s->maptype){
case 1:
quantvals=_book_maptype1_quantvals(s);
......@@ -237,7 +237,7 @@ int vorbis_staticbook_unpack(oggpack_buffer *opb,static_codebook *s){
for(i=0;i<quantvals;i++)
s->quantlist[i]=oggpack_read(opb,s->q_quant);
if(s->quantlist[quantvals-1]==-1)goto _eofout;
if(quantvals&&s->quantlist[quantvals-1]==-1)goto _eofout;
}
break;
default:
......
......@@ -11,7 +11,7 @@
********************************************************************
function: PCM data envelope analysis and manipulation
last mod: $Id: envelope.c,v 1.39 2001/12/12 09:45:24 xiphmont Exp $
last mod: $Id: envelope.c,v 1.40 2001/12/19 23:13:33 segher Exp $
Preecho calculation.
......@@ -84,8 +84,8 @@ void _ve_envelope_init(envelope_lookup *e,vorbis_info *vi){
codec_setup_info *ci=vi->codec_setup;
vorbis_info_psy_global *gi=&ci->psy_g_param;
int ch=vi->channels;
int window=e->winlength=ci->blocksizes[0]/2; /* not random */
int i;
e->winlength=ci->blocksizes[0]/2; /* not random */
e->minenergy=fromdB(gi->preecho_minenergy);
e->iir=_ogg_calloc(ch*4,sizeof(*e->iir));
e->filtered=_ogg_calloc(ch*4,sizeof(*e->filtered));
......
......@@ -11,7 +11,7 @@
********************************************************************
function: floor backend 1 implementation
last mod: $Id: floor1.c,v 1.18 2001/12/12 09:45:25 xiphmont Exp $
last mod: $Id: floor1.c,v 1.19 2001/12/19 23:13:33 segher Exp $
********************************************************************/
......@@ -1121,7 +1121,7 @@ static int floor1_inverse2(vorbis_block *vb,vorbis_look_floor *in,void *memo,
if(memo){
/* render the lines */
int *fit_value=(int *)memo;
int hx;
int hx=0;
int lx=0;
int ly=fit_value[0]*info->mult;
for(j=1;j<look->posts;j++){
......
......@@ -11,7 +11,7 @@
********************************************************************
function: residue backend 0, 1 and 2 implementation
last mod: $Id: res0.c,v 1.40 2001/12/19 01:08:15 xiphmont Exp $
last mod: $Id: res0.c,v 1.41 2001/12/19 23:13:33 segher Exp $
********************************************************************/
......@@ -302,6 +302,7 @@ vorbis_look_residue *res0_look(vorbis_dsp_state *vd,vorbis_info_mode *vm,
}
#if 0
/* does not guard against invalid settings; eg, a subn of 16 and a
subgroup request of 32. Max subn of 128 */
static int _interleaved_testhack(float *vec,int n,vorbis_look_residue0 *look,
......@@ -344,6 +345,8 @@ static int _interleaved_testhack(float *vec,int n,vorbis_look_residue0 *look,
return(i);
}
#endif
static int _testhack(float *vec,int n,vorbis_look_residue0 *look,
int auxparts,int auxpartnum){
......@@ -584,12 +587,11 @@ static int _01forward(vorbis_block *vb,vorbis_look_residue *vl,
/* training hack */
if(val<look->phrasebook->entries)
ret=vorbis_book_encode(look->phrasebook,val,&vb->opb);
look->phrasebits+=vorbis_book_encode(look->phrasebook,val,&vb->opb);
#ifdef TRAIN_RES
else
fprintf(stderr,"!");
#endif
look->phrasebits+=ret;
}
}
......
......@@ -11,7 +11,7 @@
********************************************************************
function: basic shared codebook operations
last mod: $Id: sharedbook.c,v 1.19 2001/12/12 09:45:25 xiphmont Exp $
last mod: $Id: sharedbook.c,v 1.20 2001/12/19 23:13:33 segher Exp $
********************************************************************/
......@@ -413,7 +413,7 @@ int _best(codebook *book, float *a, int step){
if(pt){
const static_codebook *c=book->c;
int i,besti=-1;
float best;
float best=0.f;
int entry=0;
/* dealing with sequentialness is a pain in the ass */
......@@ -476,7 +476,7 @@ int _best(codebook *book, float *a, int step){
{
const static_codebook *c=book->c;
int i,besti=-1;
float best;
float best=0.f;
float *e=book->valuelist;
for(i=0;i<book->entries;i++){
if(c->lengthlist[i]>0){
......
......@@ -11,7 +11,7 @@
********************************************************************
function: simple programmatic interface for encoder mode setup
last mod: $Id: vorbisenc.c,v 1.27 2001/12/19 08:10:03 xiphmont Exp $
last mod: $Id: vorbisenc.c,v 1.28 2001/12/19 23:13:33 segher Exp $
********************************************************************/
......@@ -393,8 +393,8 @@ static int vorbis_encode_residue_setup(vorbis_info *vi,double q,int block,
int i,iq=q*10;
int n,k;
int partition_position;
int res_position;
int partition_position=0;
int res_position=0;
int iterations=1;
int amplitude_select=0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment