From: JucaBlues Date: Mon, 9 Feb 2009 02:18:15 +0000 (+0000) Subject: gcc warning cleanup X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=ab026a45b1869d884ee3f0af690c3879b76425e8;p=inkscape.git gcc warning cleanup suggested parentheses --- diff --git a/src/dialogs/swatches.cpp b/src/dialogs/swatches.cpp index 1a0db9a8a..0d9daaf60 100644 --- a/src/dialogs/swatches.cpp +++ b/src/dialogs/swatches.cpp @@ -710,7 +710,7 @@ static char* trim( char* str ) { str++; } str--; - while ( str > ret && ( *str == ' ' || *str == '\t' ) || *str == '\r' || *str == '\n' ) { + while ( str > ret && (( *str == ' ' || *str == '\t' ) || *str == '\r' || *str == '\n') ) { *str-- = 0; } return ret; diff --git a/src/persp3d.cpp b/src/persp3d.cpp index 71d12619b..916e9f25f 100644 --- a/src/persp3d.cpp +++ b/src/persp3d.cpp @@ -190,7 +190,7 @@ persp3d_set(SPObject *object, unsigned key, gchar const *value) static void persp3d_update(SPObject *object, SPCtx *ctx, guint flags) { - if (flags & SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_STYLE_MODIFIED_FLAG | SP_OBJECT_VIEWPORT_MODIFIED_FLAG) { + if (flags & (SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_STYLE_MODIFIED_FLAG | SP_OBJECT_VIEWPORT_MODIFIED_FLAG)) { /* TODO: Should we update anything here? */ diff --git a/src/sp-ellipse.cpp b/src/sp-ellipse.cpp index b5f3df1cb..ce1343272 100644 --- a/src/sp-ellipse.cpp +++ b/src/sp-ellipse.cpp @@ -841,7 +841,7 @@ sp_arc_set(SPObject *object, unsigned int key, gchar const *value) static void sp_arc_modified(SPObject *object, guint flags) { - if (flags & SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_STYLE_MODIFIED_FLAG | SP_OBJECT_VIEWPORT_MODIFIED_FLAG) { + if (flags & (SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_STYLE_MODIFIED_FLAG | SP_OBJECT_VIEWPORT_MODIFIED_FLAG)) { sp_shape_set_shape((SPShape *) object); } diff --git a/src/trace/imagemap.cpp b/src/trace/imagemap.cpp index a89cfaa05..a9ad9b9c8 100644 --- a/src/trace/imagemap.cpp +++ b/src/trace/imagemap.cpp @@ -109,9 +109,9 @@ GrayMap *GrayMapCreate(int width, int height) static void ppSetPixel(PackedPixelMap *me, int x, int y, int r, int g, int b) { unsigned long *pix = me->rows[y] + x; - *pix = ((unsigned long)r)<<16 & 0xff0000L | - ((unsigned long)g)<< 8 & 0x00ff00L | - ((unsigned long)b) & 0x0000ffL; + *pix = (((unsigned long)r)<<16 & 0xff0000L) | + (((unsigned long)g)<< 8 & 0x00ff00L) | + (((unsigned long)b) & 0x0000ffL); } static void ppSetPixelLong(PackedPixelMap *me, int x, int y, unsigned long rgb)