From 5058b5848c87ff41a3d83d163cef448989bd7726 Mon Sep 17 00:00:00 2001 From: kramm Date: Tue, 5 Mar 2002 13:55:48 +0000 Subject: [PATCH] fix -Wparentheses warnings. --- lib/modules/swfbits.c | 6 +++--- lib/modules/swfbutton.c | 2 +- lib/rfxswf.h | 4 ++-- src/swfcombine.c | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/modules/swfbits.c b/lib/modules/swfbits.c index 7488667..cff2c9f 100644 --- a/lib/modules/swfbits.c +++ b/lib/modules/swfbits.c @@ -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; diff --git a/lib/modules/swfbutton.c b/lib/modules/swfbutton.c index 6a4ba43..cd9f464 100644 --- a/lib/modules/swfbutton.c +++ b/lib/modules/swfbutton.c @@ -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); diff --git a/lib/rfxswf.h b/lib/rfxswf.h index 1fe03d3..9d69ad0 100644 --- a/lib/rfxswf.h +++ b/lib/rfxswf.h @@ -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)) diff --git a/src/swfcombine.c b/src/swfcombine.c index 29996f9..229dd1d 100644 --- a/src/swfcombine.c +++ b/src/swfcombine.c @@ -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); } -- 1.7.10.4