diff options
| author | Nicolas Dufour <nicoduf@yahoo.fr> | 2015-02-07 21:23:38 +0000 |
|---|---|---|
| committer | JazzyNico <nicoduf@yahoo.fr> | 2015-02-07 21:23:38 +0000 |
| commit | c695619c4c3051dab9c2c72aa421bf803be281af (patch) | |
| tree | b413af7c6b5d2830b35da8a9a78a342d5fab2e3c /src | |
| parent | build-x64.xml, add librsvg and libcroco into binary package (diff) | |
| download | inkscape-c695619c4c3051dab9c2c72aa421bf803be281af.tar.gz inkscape-c695619c4c3051dab9c2c72aa421bf803be281af.zip | |
Fixing dead assignment and uninitialized argument value.
(bzr r13908)
Diffstat (limited to 'src')
| -rw-r--r-- | src/extension/internal/wmf-print.cpp | 3 | ||||
| -rw-r--r-- | src/trace/potrace/inkscape-potrace.cpp | 8 |
2 files changed, 6 insertions, 5 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() ) { |
