summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2015-02-08 15:41:01 +0000
committerJabiertxof <jtx@jtx.marker.es>2015-02-08 15:41:01 +0000
commitadd4c79b3c0a3a2fbb5ac229e68b8d432a6b1bc1 (patch)
treee35c404a8d72132bb82c697f6c84b7545310599a /src
parentstarting whith pointwise (diff)
parentCommenting dead assignments. (diff)
downloadinkscape-add4c79b3c0a3a2fbb5ac229e68b8d432a6b1bc1.tar.gz
inkscape-add4c79b3c0a3a2fbb5ac229e68b8d432a6b1bc1.zip
update to trunk
(bzr r13645.1.8)
Diffstat (limited to 'src')
-rw-r--r--src/extension/internal/wmf-print.cpp3
-rw-r--r--src/trace/potrace/inkscape-potrace.cpp8
-rw-r--r--src/ui/object-edit.cpp24
-rw-r--r--src/ui/tools/flood-tool.cpp4
-rw-r--r--src/widgets/gradient-toolbar.cpp9
5 files changed, 30 insertions, 18 deletions
diff --git a/src/extension/internal/wmf-print.cpp b/src/extension/internal/wmf-print.cpp
index e5ff34009..567f9f366 100644
--- a/src/extension/internal/wmf-print.cpp
+++ b/src/extension/internal/wmf-print.cpp
@@ -366,11 +366,12 @@ int PrintWmf::create_brush(SPStyle const *style, U_COLORREF *fcolor)
if (!fcolor && style) {
if (style->fill.isColor()) {
fill_mode = DRAW_PAINT;
+ /* Dead assignment: Value stored to 'opacity' is never read
float opacity = SP_SCALE24_TO_FLOAT(style->fill_opacity.value);
if (opacity <= 0.0) {
opacity = 0.0; // basically the same as no fill
}
-
+ */
sp_color_get_rgb_floatv(&style->fill.value.color, rgb);
hatchColor = U_RGB(255 * rgb[0], 255 * rgb[1], 255 * rgb[2]);
diff --git a/src/trace/potrace/inkscape-potrace.cpp b/src/trace/potrace/inkscape-potrace.cpp
index 69138463d..e9e708f52 100644
--- a/src/trace/potrace/inkscape-potrace.cpp
+++ b/src/trace/potrace/inkscape-potrace.cpp
@@ -430,7 +430,7 @@ std::vector<TracingEngineResult> PotraceTracingEngine::traceSingle(GdkPixbuf * t
if (!grayMap)
return results;
- long nodeCount;
+ long nodeCount = 0L;
std::string d = grayMapToPath(grayMap, &nodeCount);
grayMap->destroy(grayMap);
@@ -456,7 +456,7 @@ std::vector<TracingEngineResult> PotraceTracingEngine::traceGrayMap(GrayMap *gra
brightnessFloor = 0.0; //important to set this
- long nodeCount;
+ long nodeCount = 0L;
std::string d = grayMapToPath(grayMap, &nodeCount);
char const *style = "fill:#000000";
@@ -489,7 +489,7 @@ std::vector<TracingEngineResult> PotraceTracingEngine::traceBrightnessMulti(GdkP
brightnessThreshold += delta) {
GrayMap *grayMap = filter(*this, thePixbuf);
if ( grayMap ) {
- long nodeCount;
+ long nodeCount = 0L;
std::string d = grayMapToPath(grayMap, &nodeCount);
grayMap->destroy(grayMap);
@@ -558,7 +558,7 @@ std::vector<TracingEngineResult> PotraceTracingEngine::traceQuant(GdkPixbuf * th
}
//## Now we have a traceable graymap
- long nodeCount;
+ long nodeCount = 0L;
std::string d = grayMapToPath(gm, &nodeCount);
if ( !d.empty() ) {
diff --git a/src/ui/object-edit.cpp b/src/ui/object-edit.cpp
index fb99dfd59..c3bc2d52c 100644
--- a/src/ui/object-edit.cpp
+++ b/src/ui/object-edit.cpp
@@ -296,13 +296,15 @@ RectKnotHolderEntityWH::set_internal(Geom::Point const &p, Geom::Point const &or
// closer to the diagonal and in same-sign quarters, change both using ratio
s = snap_knot_position_constrained(p, Inkscape::Snapper::SnapConstraint(p_handle, Geom::Point(-ratio, -1)), state);
minx = s[Geom::X] - origin[Geom::X];
- miny = s[Geom::Y] - origin[Geom::Y];
+ // Dead assignment: Value stored to 'miny' is never read
+ //miny = s[Geom::Y] - origin[Geom::Y];
rect->height.computed = MAX(h_orig + minx / ratio, 0);
} else {
// closer to the horizontal, change only width, height is h_orig
s = snap_knot_position_constrained(p, Inkscape::Snapper::SnapConstraint(p_handle, Geom::Point(-1, 0)), state);
minx = s[Geom::X] - origin[Geom::X];
- miny = s[Geom::Y] - origin[Geom::Y];
+ // Dead assignment: Value stored to 'miny' is never read
+ //miny = s[Geom::Y] - origin[Geom::Y];
rect->height.computed = MAX(h_orig, 0);
}
rect->width.computed = MAX(w_orig + minx, 0);
@@ -312,13 +314,15 @@ RectKnotHolderEntityWH::set_internal(Geom::Point const &p, Geom::Point const &or
if (miny != 0 && fabs(minx/miny) > 0.5 * ratio && (SGN(minx) == SGN(miny))) {
// closer to the diagonal and in same-sign quarters, change both using ratio
s = snap_knot_position_constrained(p, Inkscape::Snapper::SnapConstraint(p_handle, Geom::Point(-ratio, -1)), state);
- minx = s[Geom::X] - origin[Geom::X];
+ // Dead assignment: Value stored to 'minx' is never read
+ //minx = s[Geom::X] - origin[Geom::X];
miny = s[Geom::Y] - origin[Geom::Y];
rect->width.computed = MAX(w_orig + miny * ratio, 0);
} else {
// closer to the vertical, change only height, width is w_orig
s = snap_knot_position_constrained(p, Inkscape::Snapper::SnapConstraint(p_handle, Geom::Point(0, -1)), state);
- minx = s[Geom::X] - origin[Geom::X];
+ // Dead assignment: Value stored to 'minx' is never read
+ //minx = s[Geom::X] - origin[Geom::X];
miny = s[Geom::Y] - origin[Geom::Y];
rect->width.computed = MAX(w_orig, 0);
}
@@ -388,14 +392,16 @@ RectKnotHolderEntityXY::knot_set(Geom::Point const &p, Geom::Point const &origin
// closer to the diagonal and in same-sign quarters, change both using ratio
s = snap_knot_position_constrained(p, Inkscape::Snapper::SnapConstraint(p_handle, Geom::Point(-ratio, -1)), state);
minx = s[Geom::X] - origin[Geom::X];
- miny = s[Geom::Y] - origin[Geom::Y];
+ // Dead assignment: Value stored to 'miny' is never read
+ //miny = s[Geom::Y] - origin[Geom::Y];
rect->y.computed = MIN(origin[Geom::Y] + minx / ratio, opposite_y);
rect->height.computed = MAX(h_orig - minx / ratio, 0);
} else {
// closer to the horizontal, change only width, height is h_orig
s = snap_knot_position_constrained(p, Inkscape::Snapper::SnapConstraint(p_handle, Geom::Point(-1, 0)), state);
minx = s[Geom::X] - origin[Geom::X];
- miny = s[Geom::Y] - origin[Geom::Y];
+ // Dead assignment: Value stored to 'miny' is never read
+ //miny = s[Geom::Y] - origin[Geom::Y];
rect->y.computed = MIN(origin[Geom::Y], opposite_y);
rect->height.computed = MAX(h_orig, 0);
}
@@ -406,14 +412,16 @@ RectKnotHolderEntityXY::knot_set(Geom::Point const &p, Geom::Point const &origin
if (miny != 0 && fabs(minx/miny) > 0.5 *ratio && (SGN(minx) == SGN(miny))) {
// closer to the diagonal and in same-sign quarters, change both using ratio
s = snap_knot_position_constrained(p, Inkscape::Snapper::SnapConstraint(p_handle, Geom::Point(-ratio, -1)), state);
- minx = s[Geom::X] - origin[Geom::X];
+ // Dead assignment: Value stored to 'minx' is never read
+ //minx = s[Geom::X] - origin[Geom::X];
miny = s[Geom::Y] - origin[Geom::Y];
rect->x.computed = MIN(origin[Geom::X] + miny * ratio, opposite_x);
rect->width.computed = MAX(w_orig - miny * ratio, 0);
} else {
// closer to the vertical, change only height, width is w_orig
s = snap_knot_position_constrained(p, Inkscape::Snapper::SnapConstraint(p_handle, Geom::Point(0, -1)), state);
- minx = s[Geom::X] - origin[Geom::X];
+ // Dead assignment: Value stored to 'minx' is never read
+ //minx = s[Geom::X] - origin[Geom::X];
miny = s[Geom::Y] - origin[Geom::Y];
rect->x.computed = MIN(origin[Geom::X], opposite_x);
rect->width.computed = MAX(w_orig, 0);
diff --git a/src/ui/tools/flood-tool.cpp b/src/ui/tools/flood-tool.cpp
index e4c4e855d..f9b64e4fd 100644
--- a/src/ui/tools/flood-tool.cpp
+++ b/src/ui/tools/flood-tool.cpp
@@ -1097,8 +1097,8 @@ bool FloodTool::item_handler(SPItem* item, GdkEvent* event) {
desktop->applyCurrentOrToolStyle(item, "/tools/paintbucket", false);
DocumentUndo::done(desktop->getDocument(), SP_VERB_CONTEXT_PAINTBUCKET, _("Set style on object"));
-
- ret = TRUE;
+ // Dead assignment: Value stored to 'ret' is never read
+ //ret = TRUE;
}
break;
diff --git a/src/widgets/gradient-toolbar.cpp b/src/widgets/gradient-toolbar.cpp
index ea009c048..7ce04403b 100644
--- a/src/widgets/gradient-toolbar.cpp
+++ b/src/widgets/gradient-toolbar.cpp
@@ -167,13 +167,15 @@ gboolean gr_vector_list(GtkWidget *combo_box, SPDesktop *desktop, bool selection
if (gr_selected == NULL) {
gtk_list_store_append(store, &iter);
gtk_list_store_set(store, &iter, 0, _("No gradient"), 1, NULL, 2, NULL, -1);
- sensitive = FALSE;
+ // Dead assignment: Value stored to 'sensitive' is never read
+ //sensitive = FALSE;
}
if (gr_multi) {
gtk_list_store_append(store, &iter);
gtk_list_store_set(store, &iter, 0, _("Multiple gradients"), 1, NULL, 2, NULL, -1);
- sensitive = FALSE;
+ // Dead assignment: Value stored to 'sensitive' is never read
+ //sensitive = FALSE;
}
guint idx = 0;
@@ -786,7 +788,8 @@ static gboolean update_stop_list( GtkWidget *stop_combo, SPGradient *gradient, S
gtk_list_store_append(store, &iter);
gtk_list_store_set(store, &iter, 0, label.c_str(), 1, pb, 2, stop, -1);
- sensitive = FALSE;
+ // Dead assignment: Value stored to 'sensitive' is never read
+ //sensitive = FALSE;
}
}