fix -Wparentheses warnings.
authorkramm <kramm>
Tue, 5 Mar 2002 13:55:48 +0000 (13:55 +0000)
committerkramm <kramm>
Tue, 5 Mar 2002 13:55:48 +0000 (13:55 +0000)
lib/modules/swfbits.c
lib/modules/swfbutton.c
lib/rfxswf.h
src/swfcombine.c

index 7488667..cff2c9f 100644 (file)
@@ -252,7 +252,7 @@ int swf_SetLosslessBits(TAG * t,U16 width,U16 height,void * bitmap,U8 bitmap_fla
   swf_SetU16(t,width);
   swf_SetU16(t,height);
 
-  if (data=malloc(OUTBUFFER_SIZE))
+  if ((data=malloc(OUTBUFFER_SIZE)))
   { z_stream zs;
       
     memset(&zs,0x00,sizeof(z_stream));
@@ -298,7 +298,7 @@ int swf_SetLosslessBitsIndexed(TAG * t,U16 width,U16 height,U8 * bitmap,RGBA * p
   swf_SetU16(t,height);
   swf_SetU8(t,ncolors-1); // number of pal entries
 
-  if (data=malloc(OUTBUFFER_SIZE))
+  if ((data=malloc(OUTBUFFER_SIZE)))
   { z_stream zs;
 
     memset(&zs,0x00,sizeof(z_stream));
@@ -307,7 +307,7 @@ int swf_SetLosslessBitsIndexed(TAG * t,U16 width,U16 height,U8 * bitmap,RGBA * p
 
     if (deflateInit(&zs,Z_DEFAULT_COMPRESSION)==Z_OK)
     { U8 * zpal;                    // compress palette
-      if (zpal = malloc(ncolors*4))
+      if ((zpal = malloc(ncolors*4)))
       { U8 * pp = zpal;
         int i;
 
index 6a4ba43..cd9f464 100644 (file)
@@ -76,7 +76,7 @@ int swf_ButtonPostProcess(TAG * t,int anz_action)
 
       swf_GetU16(t);                // condition
       
-      while (a=swf_GetU8(t))        // skip action records
+      while ((a=swf_GetU8(t)))        // skip action records
       { if (a&0x80)
         { U16 l = swf_GetU16(t);
           swf_GetBlock(t,NULL,l);
index 1fe03d3..9d69ad0 100644 (file)
@@ -37,8 +37,8 @@
 //#define SWAP16(s) ((U16) ((U8*)&s)[0] | ((U16) ((U8*)&s)[1] << 8))
 //#define SWAP32(s) ((U32) ((U8*)&s)[0] | ((U32) ((U8*)&s)[1] << 8) | ((U32) ((U8*)&s)[2] << 16) | ((U32) ((U8*)&s)[3] << 24))
 
-#define PUT16(ptr,x) ((U8*)(ptr))[0]=(U8)(x);((U8*)(ptr))[1]=(U8)(x>>8);
-#define PUT32(ptr,x) ((U8*)(ptr))[0]=(U8)(x);((U8*)(ptr))[1]=(U8)(x>>8);((U8*)(ptr))[2]=(U8)(x>>16);((U8*)(ptr))[3]=(U8)(x>>24);
+#define PUT16(ptr,x) ((U8*)(ptr))[0]=(U8)(x);((U8*)(ptr))[1]=(U8)((x)>>8);
+#define PUT32(ptr,x) ((U8*)(ptr))[0]=(U8)(x);((U8*)(ptr))[1]=(U8)((x)>>8);((U8*)(ptr))[2]=(U8)((x)>>16);((U8*)(ptr))[3]=(U8)((x)>>24);
 #define GET16(ptr) (((U16)(((U8*)(ptr))[0]))+(((U16)(((U8*)(ptr))[1]))<<8))
 #define GET32(ptr) (((U16)(((U8*)(ptr))[0]))+(((U16)(((U8*)(ptr))[1]))<<8)+(((U16)(((U8*)(ptr))[2]))<<16)+(((U16)(((U8*)(ptr))[3]))<<24))
 
index 29996f9..229dd1d 100644 (file)
@@ -363,7 +363,7 @@ void makestackmaster(u8**masterdata, int*masterlength)
            pos += 4;
        }
     }
-    PUT16(pos, (TAGID_END<<6 + 0));
+    PUT16(pos, ((TAGID_END<<6) + 0));
     *masterlength = pos - *masterdata;
     PUT32(fixpos, *masterlength);
 }