Fix some C64x compiler warnings.
authorTim Terriberry <tterribe@xiph.org>
Mon, 25 Oct 2010 21:17:23 +0000 (21:17 +0000)
committerTim Terriberry <tterribe@xiph.org>
Mon, 25 Oct 2010 21:17:23 +0000 (21:17 +0000)
Remove a few unused variables (that were assigned to, but never used), and
 add an explicit cast to convert -OC_LOTS_OF_BITS to unsigned, since the C64x
 compiler complains about the sign change (arguably rightly so).

svn path=/trunk/theora/; revision=17565

lib/analyze.c
lib/huffdec.c
lib/huffenc.c

index 4628326..2c25887 100644 (file)
@@ -1542,14 +1542,12 @@ static void oc_enc_mb_transform_quantize_intra_luma(oc_enc_ctx *_enc,
   oc_token_checkpoint  stack[64*4];
   oc_token_checkpoint *stackptr;
   const oc_sb_map     *sb_maps;
-  signed char         *mb_modes;
   oc_fragment         *frags;
   ptrdiff_t           *coded_fragis;
   ptrdiff_t            ncoded_fragis;
   ptrdiff_t            fragi;
   int                  bi;
   sb_maps=(const oc_sb_map *)_enc->state.sb_maps;
-  mb_modes=_enc->state.mb_modes;
   frags=_enc->state.frags;
   coded_fragis=_pipe->coded_fragis[0];
   ncoded_fragis=_pipe->ncoded_fragis[0];
index 2de563e..9e62548 100644 (file)
@@ -497,7 +497,7 @@ int oc_huff_token_decode_c(oc_pack_buf *_opb,const ogg_int16_t *_tree){
         /*We don't bother setting eof because we won't check for it after we've
            started decoding DCT tokens.*/
         if(ptr>=stop){
-          shift=-OC_LOTS_OF_BITS;
+          shift=(unsigned)-OC_LOTS_OF_BITS;
           break;
         }
         shift-=8;
index e09fbcf..77ab584 100644 (file)
@@ -918,16 +918,13 @@ int oc_huff_codes_pack(oggpack_buffer *_opb,
    codebooks.*/
 int oc_huff_codes_unpack(oc_pack_buf *_opb,
  th_huff_code _codes[TH_NHUFFMAN_TABLES][TH_NDCT_TOKENS]){
-  int ret;
   int i;
-  ret=0;
   for(i=0;i<TH_NHUFFMAN_TABLES;i++){
     ogg_uint32_t code;
     int          len;
-    int          ntokens;
     int          nleaves;
     code=0;
-    len=ntokens=nleaves=0;
+    len=nleaves=0;
     memset(_codes[i],0,TH_NDCT_TOKENS*sizeof(*_codes[i]));
     for(;;){
       long bits;