[xiph-commits] r17565 - trunk/theora/lib

tterribe at svn.xiph.org tterribe at svn.xiph.org
Mon Oct 25 14:17:23 PDT 2010


Author: tterribe
Date: 2010-10-25 14:17:23 -0700 (Mon, 25 Oct 2010)
New Revision: 17565

Modified:
   trunk/theora/lib/analyze.c
   trunk/theora/lib/huffdec.c
   trunk/theora/lib/huffenc.c
Log:
Fix some C64x compiler warnings.

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).


Modified: trunk/theora/lib/analyze.c
===================================================================
--- trunk/theora/lib/analyze.c	2010-10-25 21:11:10 UTC (rev 17564)
+++ trunk/theora/lib/analyze.c	2010-10-25 21:17:23 UTC (rev 17565)
@@ -1542,14 +1542,12 @@
   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];

Modified: trunk/theora/lib/huffdec.c
===================================================================
--- trunk/theora/lib/huffdec.c	2010-10-25 21:11:10 UTC (rev 17564)
+++ trunk/theora/lib/huffdec.c	2010-10-25 21:17:23 UTC (rev 17565)
@@ -497,7 +497,7 @@
         /*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;

Modified: trunk/theora/lib/huffenc.c
===================================================================
--- trunk/theora/lib/huffenc.c	2010-10-25 21:11:10 UTC (rev 17564)
+++ trunk/theora/lib/huffenc.c	2010-10-25 21:17:23 UTC (rev 17565)
@@ -918,16 +918,13 @@
    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;



More information about the commits mailing list