[xiph-commits] r17576 - in trunk/theora/lib: . x86

tterribe at svn.xiph.org tterribe at svn.xiph.org
Thu Oct 28 18:07:51 PDT 2010


Author: tterribe
Date: 2010-10-28 18:07:51 -0700 (Thu, 28 Oct 2010)
New Revision: 17576

Modified:
   trunk/theora/lib/decode.c
   trunk/theora/lib/state.c
   trunk/theora/lib/x86/sse2idct.c
   trunk/theora/lib/x86/x86int.h
Log:
Warning fixes.

Signed/unsigned comparison and integer conversion overflow.


Modified: trunk/theora/lib/decode.c
===================================================================
--- trunk/theora/lib/decode.c	2010-10-29 00:41:16 UTC (rev 17575)
+++ trunk/theora/lib/decode.c	2010-10-29 01:07:51 UTC (rev 17576)
@@ -118,7 +118,7 @@
 
 /*Whether or not an internal token needs any additional extra bits.*/
 #define OC_DCT_TOKEN_NEEDS_MORE(token) \
- (token<(sizeof(OC_INTERNAL_DCT_TOKEN_EXTRA_BITS)/ \
+ (token<(int)(sizeof(OC_INTERNAL_DCT_TOKEN_EXTRA_BITS)/ \
   sizeof(*OC_INTERNAL_DCT_TOKEN_EXTRA_BITS)))
 
 /*This token (OC_DCT_REPEAT_RUN3_TOKEN) requires more than 8 extra bits.*/

Modified: trunk/theora/lib/state.c
===================================================================
--- trunk/theora/lib/state.c	2010-10-29 00:41:16 UTC (rev 17575)
+++ trunk/theora/lib/state.c	2010-10-29 01:07:51 UTC (rev 17576)
@@ -579,7 +579,7 @@
   ref_frame_data_sz=_nrefs*ref_frame_sz;
   /*Check for overflow.
     The same caveats apply as for oc_state_frarray_init().*/
-  if(yplane_sz/yhstride!=yheight||2*cplane_sz+16<cplane_sz||
+  if(yplane_sz/yhstride!=(size_t)yheight||2*cplane_sz+16<cplane_sz||
    ref_frame_sz<yplane_sz||ref_frame_data_sz/_nrefs!=ref_frame_sz){
     return TH_EIMPL;
   }

Modified: trunk/theora/lib/x86/sse2idct.c
===================================================================
--- trunk/theora/lib/x86/sse2idct.c	2010-10-29 00:41:16 UTC (rev 17575)
+++ trunk/theora/lib/x86/sse2idct.c	2010-10-29 01:07:51 UTC (rev 17576)
@@ -23,7 +23,7 @@
 #if defined(OC_X86_ASM)
 
 /*A table of constants used by the MMX routines.*/
-const short __attribute__((aligned(16),used)) OC_IDCT_CONSTS[64]={
+const unsigned short __attribute__((aligned(16),used)) OC_IDCT_CONSTS[64]={
         8,      8,      8,      8,      8,      8,      8,      8,
   OC_C1S7,OC_C1S7,OC_C1S7,OC_C1S7,OC_C1S7,OC_C1S7,OC_C1S7,OC_C1S7,
   OC_C2S6,OC_C2S6,OC_C2S6,OC_C2S6,OC_C2S6,OC_C2S6,OC_C2S6,OC_C2S6,

Modified: trunk/theora/lib/x86/x86int.h
===================================================================
--- trunk/theora/lib/x86/x86int.h	2010-10-29 00:41:16 UTC (rev 17575)
+++ trunk/theora/lib/x86/x86int.h	2010-10-29 01:07:51 UTC (rev 17576)
@@ -94,7 +94,7 @@
     array_addr__; \
   }))
 
-extern const short __attribute__((aligned(16))) OC_IDCT_CONSTS[64];
+extern const unsigned short __attribute__((aligned(16))) OC_IDCT_CONSTS[64];
 
 void oc_state_accel_init_x86(oc_theora_state *_state);
 



More information about the commits mailing list