]> git.sesse.net Git - vlc/blobdiff - modules/demux/avi/libavi.c
Declared many static variables const
[vlc] / modules / demux / avi / libavi.c
index b91f0708421c7f3f54abda591f0de17eb4a7c71f..add60783b4edd5c1a7339f6c50dbe9ffff9745aa 100644 (file)
@@ -33,7 +33,7 @@
 
 #define AVI_DEBUG 1
 
-#define __EVEN( x ) ( (x)&0x01 ? (x)+1 : (x) )
+#define __EVEN( x ) (((x) + 1) & ~1)
 
 static vlc_fourcc_t GetFOURCC( const uint8_t *p_buff )
 {
@@ -406,10 +406,10 @@ static int AVI_ChunkRead_strf( stream_t *s, avi_chunk_t *p_chk )
             }
 #ifdef AVI_DEBUG
             msg_Dbg( (vlc_object_t*)s,
-                     "strf: video:%4.4s %dx%d planes:%d %dbpp",
+                     "strf: video:%4.4s %"PRIu32"x%"PRIu32" planes:%d %dbpp",
                      (char*)&p_chk->strf.vids.p_bih->biCompression,
-                     p_chk->strf.vids.p_bih->biWidth,
-                     p_chk->strf.vids.p_bih->biHeight,
+                     (uint32_t)p_chk->strf.vids.p_bih->biWidth,
+                     (uint32_t)p_chk->strf.vids.p_bih->biHeight,
                      p_chk->strf.vids.p_bih->biPlanes,
                      p_chk->strf.vids.p_bih->biBitCount );
 #endif
@@ -575,7 +575,7 @@ static void AVI_ChunkFree_indx( avi_chunk_t *p_chk )
 
 
 
-static struct
+static const struct
 {
     vlc_fourcc_t i_fourcc;
     const char *psz_type;
@@ -651,10 +651,10 @@ static int AVI_ChunkRead_nothing( stream_t *s, avi_chunk_t *p_chk )
 }
 static void AVI_ChunkFree_nothing( avi_chunk_t *p_chk )
 {
-
+    VLC_UNUSED( p_chk );
 }
 
-static struct
+static const struct
 {
     vlc_fourcc_t i_fourcc;
     int   (*AVI_ChunkRead_function)( stream_t *s, avi_chunk_t *p_chk );