Get rid of warning
authorjm <jm@0101bb08-14d6-0310-b084-bc0e0c8e3800>
Sun, 27 Oct 2002 07:08:21 +0000 (07:08 +0000)
committerjm <jm@0101bb08-14d6-0310-b084-bc0e0c8e3800>
Sun, 27 Oct 2002 07:08:21 +0000 (07:08 +0000)
git-svn-id: http://svn.xiph.org/trunk/speex@4061 0101bb08-14d6-0310-b084-bc0e0c8e3800

src/speexdec.c
src/speexenc.c

index 7265524..33c5d6a 100644 (file)
 
 #define MAX_FRAME_SIZE 2000
 
-#define readint(buf, base) ((buf[base+3]<<24)&0xff000000| \
-                           (buf[base+2]<<16)&0xff0000| \
-                           (buf[base+1]<<8)&0xff00| \
-                           buf[base]&0xff)
+#define readint(buf, base) (((buf[base+3]<<24)&0xff000000)| \
+                           ((buf[base+2]<<16)&0xff0000)| \
+                           ((buf[base+1]<<8)&0xff00)| \
+                           (buf[base]&0xff))
 
 static void print_comments(char *comments, int length)
 {
index 576ac96..2714fb0 100644 (file)
@@ -604,13 +604,13 @@ The comment header is decoded as follows:
   If you have troubles, please write to ymnk@jcraft.com.
  */
 
-#define readint(buf, base) ((buf[base+3]<<24)&0xff000000| \
-                           (buf[base+2]<<16)&0xff0000| \
-                           (buf[base+1]<<8)&0xff00| \
-                           buf[base]&0xff)
-#define writeint(buf, base, val) do{ buf[base+3]=(val>>24)&0xff; \
-                                     buf[base+2]=(val>>16)&0xff; \
-                                     buf[base+1]=(val>>8)&0xff; \
+#define readint(buf, base) (((buf[base+3]<<24)&0xff000000)| \
+                           ((buf[base+2]<<16)&0xff0000)| \
+                           ((buf[base+1]<<8)&0xff00)| \
+                           (buf[base]&0xff))
+#define writeint(buf, base, val) do{ buf[base+3]=((val)>>24)&0xff; \
+                                     buf[base+2]=((val)>>16)&0xff; \
+                                     buf[base+1]=((val)>>8)&0xff; \
                                      buf[base]=(val)&0xff; \
                                  }while(0)