From 0e1f34b49da3066bed94b316f22e6dd805509bf3 Mon Sep 17 00:00:00 2001 From: ElectricSolstice Date: Mon, 16 Feb 2015 18:58:41 -0800 Subject: Changed code to remove gcc -Wparentheses warnings. --- drivers/etc1/rg_etc1.cpp | 2 +- drivers/trex/trex.c | 2 +- drivers/vorbis/codebook.c | 2 +- drivers/vorbis/floor1.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'drivers') diff --git a/drivers/etc1/rg_etc1.cpp b/drivers/etc1/rg_etc1.cpp index cad9af8830..63877e6d12 100644 --- a/drivers/etc1/rg_etc1.cpp +++ b/drivers/etc1/rg_etc1.cpp @@ -2367,7 +2367,7 @@ found_perfect_match: int dr = best_results[1].m_block_color_unscaled.r - best_results[0].m_block_color_unscaled.r; int dg = best_results[1].m_block_color_unscaled.g - best_results[0].m_block_color_unscaled.g; int db = best_results[1].m_block_color_unscaled.b - best_results[0].m_block_color_unscaled.b; - RG_ETC1_ASSERT(best_use_color4 || (rg_etc1::minimum(dr, dg, db) >= cETC1ColorDeltaMin) && (rg_etc1::maximum(dr, dg, db) <= cETC1ColorDeltaMax)); + RG_ETC1_ASSERT(best_use_color4 || ((rg_etc1::minimum(dr, dg, db) >= cETC1ColorDeltaMin) && (rg_etc1::maximum(dr, dg, db) <= cETC1ColorDeltaMax))); if (best_use_color4) { diff --git a/drivers/trex/trex.c b/drivers/trex/trex.c index e63a248e9e..b3668c3a11 100644 --- a/drivers/trex/trex.c +++ b/drivers/trex/trex.c @@ -489,7 +489,7 @@ static const TRexChar *trex_matchnode(TRex* exp,TRexNode *node,const TRexChar *s return cur; } case OP_WB: - if(str == exp->_bol && !isspace(*str) + if((str == exp->_bol && !isspace(*str)) || (str == exp->_eol && !isspace(*(str-1))) || (!isspace(*str) && isspace(*(str+1))) || (isspace(*str) && !isspace(*(str+1))) ) { diff --git a/drivers/vorbis/codebook.c b/drivers/vorbis/codebook.c index 759d7b4254..8a928cebb9 100644 --- a/drivers/vorbis/codebook.c +++ b/drivers/vorbis/codebook.c @@ -248,7 +248,7 @@ static_codebook *vorbis_staticbook_unpack(oggpack_buffer *opb){ } /* quantized values */ - if((quantvals*s->q_quant+7>>3)>opb->storage-oggpack_bytes(opb)) + if(((quantvals*s->q_quant+7)>>3)>opb->storage-oggpack_bytes(opb)) goto _eofout; s->quantlist=_ogg_malloc(sizeof(*s->quantlist)*quantvals); for(i=0;iloneighbor[i-2]]&=0x7fff; fit_value[look->hineighbor[i-2]]&=0x7fff; -- cgit v1.2.3