From: joncruz Date: Tue, 10 Feb 2009 07:30:56 +0000 (+0000) Subject: Adding explicit parenthesis to remove warnings X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=de7fb4f0c90c78ab1eae3c5a6eda59a0366be610;p=inkscape.git Adding explicit parenthesis to remove warnings --- diff --git a/src/helper/units.cpp b/src/helper/units.cpp index 3e632a0ca..47c4746ac 100644 --- a/src/helper/units.cpp +++ b/src/helper/units.cpp @@ -137,8 +137,8 @@ sp_convert_distance(gdouble *distance, SPUnit const *from, SPUnit const *to) if ((from->base == SP_UNIT_VOLATILE) || (to->base == SP_UNIT_VOLATILE)) return FALSE; if ((from->base == to->base) - || (from->base == SP_UNIT_DEVICE) && (to->base == SP_UNIT_ABSOLUTE) - || (from->base == SP_UNIT_ABSOLUTE) && (to->base == SP_UNIT_DEVICE)) + || ((from->base == SP_UNIT_DEVICE) && (to->base == SP_UNIT_ABSOLUTE)) + || ((from->base == SP_UNIT_ABSOLUTE) && (to->base == SP_UNIT_DEVICE))) { *distance = *distance * from->unittobase / to->unittobase; return TRUE; diff --git a/src/widgets/layer-selector.cpp b/src/widgets/layer-selector.cpp index 65f64fa4f..d51b31e67 100644 --- a/src/widgets/layer-selector.cpp +++ b/src/widgets/layer-selector.cpp @@ -539,7 +539,7 @@ void LayerSelector::_prepareLabelRenderer( SPObject *layer=( _desktop ? _desktop->currentLayer() : NULL ); SPObject *root=( _desktop ? _desktop->currentRoot() : NULL ); - bool isancestor = !( layer && SP_OBJECT_PARENT(object) == SP_OBJECT_PARENT(layer) || layer == root && SP_OBJECT_PARENT(object) == root); + bool isancestor = !( (layer && (SP_OBJECT_PARENT(object) == SP_OBJECT_PARENT(layer))) || ((layer == root) && (SP_OBJECT_PARENT(object) == root))); bool iscurrent = ( object == layer && object != root ); diff --git a/src/xml/repr-util.cpp b/src/xml/repr-util.cpp index 528902fef..0a2997437 100644 --- a/src/xml/repr-util.cpp +++ b/src/xml/repr-util.cpp @@ -416,8 +416,8 @@ sp_repr_lookup_child(Inkscape::XML::Node *repr, g_return_val_if_fail(repr != NULL, NULL); for ( Inkscape::XML::Node *child = repr->firstChild() ; child ; child = child->next() ) { gchar const *child_value = child->attribute(key); - if ( child_value == value || - value && child_value && !strcmp(child_value, value) ) + if ( (child_value == value) || + (value && child_value && !strcmp(child_value, value)) ) { return child; }