diff -urN tremor-svn-r18116-orig/block.c tremor-svn-r18116/block.c
--- tremor-svn-r18116-orig/block.c	2014-05-19 21:31:05 +0900
+++ tremor-svn-r18116/block.c	2014-05-19 21:31:29 +0900
@@ -25,6 +25,7 @@
 #include "window.h"
 #include "registry.h"
 #include "misc.h"
+#include "block.h"
 
 static int ilog(unsigned int v){
   int ret=0;
diff -urN tremor-svn-r18116-orig/codebook.c tremor-svn-r18116/codebook.c
--- tremor-svn-r18116-orig/codebook.c	2014-05-19 21:31:05 +0900
+++ tremor-svn-r18116/codebook.c	2014-05-19 21:31:29 +0900
@@ -336,7 +336,7 @@
     }
   }else{
 
-    int i,j;
+    int i;
     for(i=0;i<n;){
       a[i++]=0;
     }
diff -urN tremor-svn-r18116-orig/floor0.c tremor-svn-r18116/floor0.c
--- tremor-svn-r18116-orig/floor0.c	2014-05-19 21:31:04 +0900
+++ tremor-svn-r18116/floor0.c	2014-05-19 21:31:33 +0900
@@ -117,6 +117,8 @@
   }
 }
 
+#ifndef _V_LSP_MATH_ASM
+
 static const unsigned char MLOOP_1[64]={
    0,10,11,11, 12,12,12,12, 13,13,13,13, 13,13,13,13,
   14,14,14,14, 14,14,14,14, 14,14,14,14, 14,14,14,14,
@@ -133,11 +135,13 @@
 
 static const unsigned char MLOOP_3[8]={0,1,2,2,3,3,3,3};
 
-void vorbis_lsp_to_curve(ogg_int32_t *curve,int *map,int n,int ln,
-			 ogg_int32_t *lsp,int m,
-			 ogg_int32_t amp,
-			 ogg_int32_t ampoffset,
-			 ogg_int32_t *icos){
+#endif
+
+static void vorbis_lsp_to_curve(ogg_int32_t *curve,int *map,int n,int ln,
+				ogg_int32_t *lsp,int m,
+				ogg_int32_t amp,
+				ogg_int32_t ampoffset,
+				ogg_int32_t *icos){
 
   /* 0 <= m < 256 */
 
@@ -165,10 +169,10 @@
 
   i=0;
   while(i<n){
-    int j,k=map[i];
+    int k=map[i];
     ogg_uint32_t pi=46341; /* 2**-.5 in 0.16 */
     ogg_uint32_t qi=46341;
-    ogg_int32_t qexp=0,shift;
+    ogg_int32_t qexp=0;
     ogg_int32_t wi=icos[k];
 
 #ifdef _V_LSP_MATH_ASM
@@ -197,6 +201,9 @@
 
 #else
 
+    int j;
+    ogg_int32_t shift;
+
     j=1;
     if(m>1){
       qi*=labs(ilsp[0]-wi);
diff -urN tremor-svn-r18116-orig/ivorbisfile.h tremor-svn-r18116/ivorbisfile.h
--- tremor-svn-r18116-orig/ivorbisfile.h	2014-05-19 21:31:04 +0900
+++ tremor-svn-r18116/ivorbisfile.h	2014-05-19 21:31:29 +0900
@@ -89,6 +89,7 @@
 extern int ov_open(FILE *f,OggVorbis_File *vf,const char *initial,long ibytes);
 extern int ov_open_callbacks(void *datasource, OggVorbis_File *vf,
 		const char *initial, long ibytes, ov_callbacks callbacks);
+extern int ov_fopen(const char *path,OggVorbis_File *vf);
 
 extern int ov_test(FILE *f,OggVorbis_File *vf,const char *initial,long ibytes);
 extern int ov_test_callbacks(void *datasource, OggVorbis_File *vf,
diff -urN tremor-svn-r18116-orig/mdct.c tremor-svn-r18116/mdct.c
--- tremor-svn-r18116-orig/mdct.c	2014-05-19 21:31:05 +0900
+++ tremor-svn-r18116/mdct.c	2014-05-19 21:31:29 +0900
@@ -147,7 +147,7 @@
 /* N/stage point generic N stage butterfly (in place, 2 register) */
 STIN void mdct_butterfly_generic(DATA_TYPE *x,int points,int step){
 
-  LOOKUP_T *T   = sincos_lookup0;
+  const LOOKUP_T *T   = sincos_lookup0;
   DATA_TYPE *x1        = x + points      - 8;
   DATA_TYPE *x2        = x + (points>>1) - 8;
   REG_TYPE   r0;
@@ -257,8 +257,8 @@
   int          bit   = 0;
   DATA_TYPE   *w0    = x;
   DATA_TYPE   *w1    = x = w0+(n>>1);
-  LOOKUP_T    *T = (step>=4)?(sincos_lookup0+(step>>1)):sincos_lookup1;
-  LOOKUP_T    *Ttop  = T+1024;
+  const LOOKUP_T    *T = (step>=4)?(sincos_lookup0+(step>>1)):sincos_lookup1;
+  const LOOKUP_T    *Ttop  = T+1024;
   DATA_TYPE    r2;
 
   do{
@@ -342,8 +342,8 @@
   int n4=n>>2;
   DATA_TYPE *iX;
   DATA_TYPE *oX;
-  LOOKUP_T *T;
-  LOOKUP_T *V;
+  const LOOKUP_T *T;
+  const LOOKUP_T *V;
   int shift;
   int step;
 
diff -urN tremor-svn-r18116-orig/misc.h tremor-svn-r18116/misc.h
--- tremor-svn-r18116-orig/misc.h	2014-05-19 21:31:04 +0900
+++ tremor-svn-r18116/misc.h	2014-05-19 21:31:29 +0900
@@ -22,10 +22,10 @@
 
 #ifdef _LOW_ACCURACY_
 #  define X(n) (((((n)>>22)+1)>>1) - ((((n)>>22)+1)>>9))
-#  define LOOKUP_T const unsigned char
+#  define LOOKUP_T unsigned char
 #else
 #  define X(n) (n)
-#  define LOOKUP_T const ogg_int32_t
+#  define LOOKUP_T ogg_int32_t
 #endif
 
 #include "asm_arm.h"
diff -urN tremor-svn-r18116-orig/res012.c tremor-svn-r18116/res012.c
--- tremor-svn-r18116-orig/res012.c	2014-05-19 21:31:05 +0900
+++ tremor-svn-r18116/res012.c	2014-05-19 21:31:29 +0900
@@ -42,7 +42,7 @@
 
 } vorbis_look_residue0;
 
-void res0_free_info(vorbis_info_residue *i){
+static void res0_free_info(vorbis_info_residue *i){
   vorbis_info_residue0 *info=(vorbis_info_residue0 *)i;
   if(info){
     memset(info,0,sizeof(*info));
@@ -50,7 +50,7 @@
   }
 }
 
-void res0_free_look(vorbis_look_residue *i){
+static void res0_free_look(vorbis_look_residue *i){
   int j;
   if(i){
 
@@ -87,7 +87,7 @@
 }
 
 /* vorbis_info is for range checking */
-vorbis_info_residue *res0_unpack(vorbis_info *vi,oggpack_buffer *opb){
+static vorbis_info_residue *res0_unpack(vorbis_info *vi,oggpack_buffer *opb){
   int j,acc=0;
   vorbis_info_residue0 *info=(vorbis_info_residue0 *)_ogg_calloc(1,sizeof(*info));
   codec_setup_info     *ci=(codec_setup_info *)vi->codec_setup;
@@ -151,8 +151,9 @@
   return(NULL);
 }
 
-vorbis_look_residue *res0_look(vorbis_dsp_state *vd,vorbis_info_mode *vm,
-			  vorbis_info_residue *vr){
+static vorbis_look_residue *res0_look(vorbis_dsp_state *vd,
+				      vorbis_info_mode *vm,
+				      vorbis_info_residue *vr){
   vorbis_info_residue0 *info=(vorbis_info_residue0 *)vr;
   vorbis_look_residue0 *look=(vorbis_look_residue0 *)_ogg_calloc(1,sizeof(*look));
   codec_setup_info     *ci=(codec_setup_info *)vd->vi->codec_setup;
@@ -266,8 +267,8 @@
   return(0);
 }
 
-int res0_inverse(vorbis_block *vb,vorbis_look_residue *vl,
-		 ogg_int32_t **in,int *nonzero,int ch){
+static int res0_inverse(vorbis_block *vb,vorbis_look_residue *vl,
+			ogg_int32_t **in,int *nonzero,int ch){
   int i,used=0;
   for(i=0;i<ch;i++)
     if(nonzero[i])
@@ -278,8 +279,8 @@
     return(0);
 }
 
-int res1_inverse(vorbis_block *vb,vorbis_look_residue *vl,
-		 ogg_int32_t **in,int *nonzero,int ch){
+static int res1_inverse(vorbis_block *vb,vorbis_look_residue *vl,
+			ogg_int32_t **in,int *nonzero,int ch){
   int i,used=0;
   for(i=0;i<ch;i++)
     if(nonzero[i])
@@ -291,8 +292,8 @@
 }
 
 /* duplicate code here as speed is somewhat more important */
-int res2_inverse(vorbis_block *vb,vorbis_look_residue *vl,
-		 ogg_int32_t **in,int *nonzero,int ch){
+static int res2_inverse(vorbis_block *vb,vorbis_look_residue *vl,
+			ogg_int32_t **in,int *nonzero,int ch){
   long i,k,l,s;
   vorbis_look_residue0 *look=(vorbis_look_residue0 *)vl;
   vorbis_info_residue0 *info=look->info;
diff -urN tremor-svn-r18116-orig/sharedbook.c tremor-svn-r18116/sharedbook.c
--- tremor-svn-r18116-orig/sharedbook.c	2014-05-19 21:31:05 +0900
+++ tremor-svn-r18116/sharedbook.c	2014-05-19 21:31:29 +0900
@@ -67,7 +67,7 @@
 /* given a list of word lengths, generate a list of codewords.  Works
    for length ordered or unordered, always assigns the lowest valued
    codewords first.  Extended to handle unused entries (length 0) */
-ogg_uint32_t *_make_words(long *l,long n,long sparsecount){
+static ogg_uint32_t *_make_words(long *l,long n,long sparsecount){
   long i,j,count=0;
   ogg_uint32_t marker[33];
   ogg_uint32_t *r=(ogg_uint32_t *)_ogg_malloc((sparsecount?sparsecount:n)*sizeof(*r));
@@ -191,8 +191,8 @@
    the values in the quant vector). in map type 2, all the values came
    in in an explicit list.  Both value lists must be unpacked */
 
-ogg_int32_t *_book_unquantize(const static_codebook *b,int n,int *sparsemap,
-			      int *maxpoint){
+static ogg_int32_t *_book_unquantize(const static_codebook *b,int n,
+				     int *sparsemap,int *maxpoint){
   long j,k,count=0;
   if(b->maptype==1 || b->maptype==2){
     int quantvals;
diff -urN tremor-svn-r18116-orig/vorbisfile.c tremor-svn-r18116/vorbisfile.c
--- tremor-svn-r18116-orig/vorbisfile.c	2014-05-19 21:31:05 +0900
+++ tremor-svn-r18116/vorbisfile.c	2014-05-19 21:31:29 +0900
@@ -246,7 +246,7 @@
         ret_gran=ogg_page_granulepos(&og);
         offset=ret;
 
-        if((ogg_uint32_t)ret_serialno == *serialno){
+        if((int)ret_serialno == *serialno){
           prefoffset=ret;
           *granpos=ret_gran;
         }
@@ -775,7 +775,7 @@
         vf->bittrack+=og.header_len*8;
 
         if(vf->ready_state==INITSET){
-          if(vf->current_serialno!=ogg_page_serialno(&og)){
+          if((int)vf->current_serialno!=ogg_page_serialno(&og)){
 
             /* two possibilities:
                1) our decoding just traversed a bitstream boundary
@@ -1299,7 +1299,7 @@
 
       /* has our decoding just traversed a bitstream boundary? */
       if(vf->ready_state>=STREAMSET){
-        if(vf->current_serialno!=ogg_page_serialno(&og)){
+        if((int)vf->current_serialno!=ogg_page_serialno(&og)){
 
           /* two possibilities:
              1) our decoding just traversed a bitstream boundary
@@ -1354,7 +1354,7 @@
 /* rescales the number x from the range of [0,from] to [0,to]
    x is in the range [0,from]
    from, to are in the range [1, 1<<62-1] */
-ogg_int64_t rescale64(ogg_int64_t x, ogg_int64_t from, ogg_int64_t to){
+static ogg_int64_t rescale64(ogg_int64_t x, ogg_int64_t from, ogg_int64_t to){
   ogg_int64_t frac=0;
   ogg_int64_t ret=0;
   int i;
@@ -1454,7 +1454,7 @@
         }else{
           ogg_int64_t granulepos;
 
-          if(ogg_page_serialno(&og)!=vf->serialnos[link])
+          if(ogg_page_serialno(&og)!=(int)vf->serialnos[link])
             continue;
 
           granulepos=ogg_page_granulepos(&og);
@@ -1531,7 +1531,7 @@
           while(1){
             result=_get_prev_page(vf,&og);
             if(result<0) goto seek_error;
-            if(ogg_page_serialno(&og)==vf->current_serialno &&
+            if(ogg_page_serialno(&og)==(int)vf->current_serialno &&
                (ogg_page_granulepos(&og)>-1 ||
                 !ogg_page_continued(&og))){
               return ov_raw_seek(vf,result);
diff -urN tremor-svn-r18116-orig/window.c tremor-svn-r18116/window.c
--- tremor-svn-r18116-orig/window.c	2014-05-19 21:31:05 +0900
+++ tremor-svn-r18116/window.c	2014-05-19 21:31:29 +0900
@@ -56,7 +56,7 @@
 			  long *blocksizes,
 			  int lW,int W,int nW){
   
-  LOOKUP_T *window[2]={window_p[0],window_p[1]};
+  const LOOKUP_T *window[2]={window_p[0],window_p[1]};
   long n=blocksizes[W];
   long ln=blocksizes[lW];
   long rn=blocksizes[nW];
