diff options
| author | Jon A. Cruz <jon@joncruz.org> | 2012-04-18 07:02:24 +0000 |
|---|---|---|
| committer | Jon A. Cruz <jon@joncruz.org> | 2012-04-18 07:02:24 +0000 |
| commit | 36e3c5550b49949729f2f23ab1796afdc53d6487 (patch) | |
| tree | 8e1dc72ecb79f130bf9c07576c7d97e44c9d0186 | |
| parent | Fix for 903676 : Replace GtkCList with GtkTreeView in XML Tree, fix assert on... (diff) | |
| download | inkscape-36e3c5550b49949729f2f23ab1796afdc53d6487.tar.gz inkscape-36e3c5550b49949729f2f23ab1796afdc53d6487.zip | |
Warning cleanup
(bzr r11265)
| -rw-r--r-- | src/extension/internal/gdkpixbuf-input.cpp | 6 | ||||
| -rw-r--r-- | src/extension/internal/latex-pstricks-out.cpp | 26 | ||||
| -rw-r--r-- | src/extension/internal/latex-pstricks.cpp | 25 | ||||
| -rw-r--r-- | src/extension/internal/pdf-input-cairo.cpp | 4 | ||||
| -rw-r--r-- | src/extension/internal/pdfinput/pdf-input.cpp | 9 | ||||
| -rw-r--r-- | src/extension/internal/pdfinput/svg-builder.cpp | 12 | ||||
| -rw-r--r-- | src/extension/internal/svg.cpp | 8 | ||||
| -rw-r--r-- | src/extension/internal/svgz.cpp | 12 | ||||
| -rw-r--r-- | src/livarot/ShapeMisc.cpp | 28 | ||||
| -rw-r--r-- | src/live_effects/lpe-knot.cpp | 3 | ||||
| -rw-r--r-- | src/live_effects/lpe-rough-hatches.cpp | 8 | ||||
| -rw-r--r-- | src/widgets/paint-selector.cpp | 4 |
12 files changed, 62 insertions, 83 deletions
diff --git a/src/extension/internal/gdkpixbuf-input.cpp b/src/extension/internal/gdkpixbuf-input.cpp index 4519befcf..80be2ecc2 100644 --- a/src/extension/internal/gdkpixbuf-input.cpp +++ b/src/extension/internal/gdkpixbuf-input.cpp @@ -54,7 +54,7 @@ GdkpixbufInput::open(Inkscape::Extension::Input *mod, char const *uri) static std::set<Glib::ustring> lossy = create_lossy_set(); if (pb) { /* We are readable */ - bool is_lossy; + // TODO revisit: bool is_lossy; Glib::ustring mime_type, ext; Glib::ustring u = uri; std::size_t dotpos = u.rfind('.'); @@ -64,10 +64,10 @@ GdkpixbufInput::open(Inkscape::Extension::Input *mod, char const *uri) // HACK: replace with something better based on GIO if (!ext.empty() && lossy.find(ext) != lossy.end()) { - is_lossy = true; + // TODO revisit: is_lossy = true; mime_type = "image/jpeg"; } else { - is_lossy = false; + // TODO revisit: is_lossy = false; mime_type = "image/png"; } diff --git a/src/extension/internal/latex-pstricks-out.cpp b/src/extension/internal/latex-pstricks-out.cpp index decc42d94..3ce2c5531 100644 --- a/src/extension/internal/latex-pstricks-out.cpp +++ b/src/extension/internal/latex-pstricks-out.cpp @@ -49,8 +49,6 @@ bool LatexOutput::check(Inkscape::Extension::Extension * /*module*/) void LatexOutput::save(Inkscape::Extension::Output * /*mod2*/, SPDocument *doc, gchar const *filename) { SPPrintContext context; - unsigned int ret = 0; - doc->ensureUpToDate(); Inkscape::Extension::Print *mod = Inkscape::Extension::get_print(SP_MODULE_KEY_PRINT_LATEX); @@ -58,28 +56,26 @@ void LatexOutput::save(Inkscape::Extension::Output * /*mod2*/, SPDocument *doc, gchar * oldoutput = g_strdup(oldconst); mod->set_param_string("destination", filename); - /* Start */ + // Start context.module = mod; - /* fixme: This has to go into module constructor somehow */ + // fixme: This has to go into module constructor somehow mod->base = doc->getRoot(); Inkscape::Drawing drawing; - mod->dkey = SPItem::display_key_new (1); - mod->root = (mod->base)->invoke_show (drawing, mod->dkey, SP_ITEM_SHOW_DISPLAY); + mod->dkey = SPItem::display_key_new(1); + mod->root = (mod->base)->invoke_show(drawing, mod->dkey, SP_ITEM_SHOW_DISPLAY); drawing.setRoot(mod->root); - /* Print document */ - ret = mod->begin (doc); - (mod->base)->invoke_print (&context); - ret = mod->finish (); - /* Release things */ - (mod->base)->invoke_hide (mod->dkey); + // Print document + mod->begin(doc); + (mod->base)->invoke_print(&context); + mod->finish(); + // Release things + (mod->base)->invoke_hide(mod->dkey); mod->base = NULL; mod->root = NULL; // should have been deleted by invoke_hide - /* end */ + // end mod->set_param_string("destination", oldoutput); g_free(oldoutput); - - return; } #include "clear-n_.h" diff --git a/src/extension/internal/latex-pstricks.cpp b/src/extension/internal/latex-pstricks.cpp index bdf95f941..c1eddf539 100644 --- a/src/extension/internal/latex-pstricks.cpp +++ b/src/extension/internal/latex-pstricks.cpp @@ -326,22 +326,17 @@ PrintLatex::textToPath(Inkscape::Extension::Print * ext) #include "clear-n_.h" -void -PrintLatex::init (void) +void PrintLatex::init(void) { - Inkscape::Extension::Extension * ext; - - /* SVG in */ - ext = Inkscape::Extension::build_from_mem( - "<inkscape-extension xmlns=\"" INKSCAPE_EXTENSION_URI "\">\n" - "<name>" N_("LaTeX Print") "</name>\n" - "<id>" SP_MODULE_KEY_PRINT_LATEX "</id>\n" - "<param name=\"destination\" type=\"string\"></param>\n" - "<param name=\"textToPath\" type=\"boolean\">true</param>\n" - "<print/>\n" - "</inkscape-extension>", new PrintLatex()); - - return; + /* SVG in */ + Inkscape::Extension::build_from_mem( + "<inkscape-extension xmlns=\"" INKSCAPE_EXTENSION_URI "\">\n" + "<name>" N_("LaTeX Print") "</name>\n" + "<id>" SP_MODULE_KEY_PRINT_LATEX "</id>\n" + "<param name=\"destination\" type=\"string\"></param>\n" + "<param name=\"textToPath\" type=\"boolean\">true</param>\n" + "<print/>\n" + "</inkscape-extension>", new PrintLatex()); } } /* namespace Internal */ diff --git a/src/extension/internal/pdf-input-cairo.cpp b/src/extension/internal/pdf-input-cairo.cpp index b1cf13db1..0a89c6661 100644 --- a/src/extension/internal/pdf-input-cairo.cpp +++ b/src/extension/internal/pdf-input-cairo.cpp @@ -631,9 +631,7 @@ static cairo_status_t void PdfInputCairo::init(void) { - Inkscape::Extension::Extension * ext; - - ext = Inkscape::Extension::build_from_mem( + Inkscape::Extension::build_from_mem( "<inkscape-extension xmlns=\"" INKSCAPE_EXTENSION_URI "\">\n" "<name>PDF Input</name>\n" "<id>org.inkscape.input.cairo-pdf</id>\n" diff --git a/src/extension/internal/pdfinput/pdf-input.cpp b/src/extension/internal/pdfinput/pdf-input.cpp index 35972c00e..8802ce2ba 100644 --- a/src/extension/internal/pdfinput/pdf-input.cpp +++ b/src/extension/internal/pdfinput/pdf-input.cpp @@ -735,12 +735,9 @@ PdfInput::open(::Inkscape::Extension::Input * /*mod*/, const gchar * uri) { #include "../clear-n_.h" -void -PdfInput::init(void) { - Inkscape::Extension::Extension * ext; - +void PdfInput::init(void) { /* PDF in */ - ext = Inkscape::Extension::build_from_mem( + Inkscape::Extension::build_from_mem( "<inkscape-extension xmlns=\"" INKSCAPE_EXTENSION_URI "\">\n" "<name>" N_("PDF Input") "</name>\n" "<id>org.inkscape.input.pdf</id>\n" @@ -753,7 +750,7 @@ PdfInput::init(void) { "</inkscape-extension>", new PdfInput()); /* AI in */ - ext = Inkscape::Extension::build_from_mem( + Inkscape::Extension::build_from_mem( "<inkscape-extension xmlns=\"" INKSCAPE_EXTENSION_URI "\">\n" "<name>" N_("AI Input") "</name>\n" "<id>org.inkscape.input.ai</id>\n" diff --git a/src/extension/internal/pdfinput/svg-builder.cpp b/src/extension/internal/pdfinput/svg-builder.cpp index eefd66e12..6606e1846 100644 --- a/src/extension/internal/pdfinput/svg-builder.cpp +++ b/src/extension/internal/pdfinput/svg-builder.cpp @@ -910,10 +910,10 @@ void SvgBuilder::updateStyle(GfxState *state) { that a space in sp may be removed or replaced by some other tokens specified in the code. (Bug LP #179589) */ -static int MatchingChars(std::string s1, std::string sp) +static size_t MatchingChars(std::string s1, std::string sp) { - unsigned int is = 0; - unsigned int ip = 0; + size_t is = 0; + size_t ip = 0; while(is < s1.length() && ip < sp.length()) { if (s1[is] == sp[ip]) { @@ -927,7 +927,7 @@ static int MatchingChars(std::string s1, std::string sp) break; } } - return(ip); + return ip; } /* @@ -944,12 +944,12 @@ std::string SvgBuilder::_BestMatchingFont(std::string PDFname) std::string fontname = _availableFontNames[i]; // At least the first word of the font name should match. - guint minMatch = fontname.find(" "); + size_t minMatch = fontname.find(" "); if (minMatch == std::string::npos) { minMatch = fontname.length(); } - int Match = MatchingChars(PDFname, fontname); + size_t Match = MatchingChars(PDFname, fontname); if (Match >= minMatch) { double relMatch = (float)Match / (fontname.length() + PDFname.length()); if (relMatch > bestMatch) { diff --git a/src/extension/internal/svg.cpp b/src/extension/internal/svg.cpp index d054e4427..7d0b8299c 100644 --- a/src/extension/internal/svg.cpp +++ b/src/extension/internal/svg.cpp @@ -83,10 +83,8 @@ void pruneExtendedAttributes( Inkscape::XML::Node *repr ) void Svg::init(void) { - Inkscape::Extension::Extension * ext; - /* SVG in */ - ext = Inkscape::Extension::build_from_mem( + Inkscape::Extension::build_from_mem( "<inkscape-extension xmlns=\"" INKSCAPE_EXTENSION_URI "\">\n" "<name>" N_("SVG Input") "</name>\n" "<id>" SP_MODULE_KEY_INPUT_SVG "</id>\n" @@ -100,7 +98,7 @@ Svg::init(void) "</inkscape-extension>", new Svg()); /* SVG out Inkscape */ - ext = Inkscape::Extension::build_from_mem( + Inkscape::Extension::build_from_mem( "<inkscape-extension xmlns=\"" INKSCAPE_EXTENSION_URI "\">\n" "<name>" N_("SVG Output Inkscape") "</name>\n" "<id>" SP_MODULE_KEY_OUTPUT_SVG_INKSCAPE "</id>\n" @@ -114,7 +112,7 @@ Svg::init(void) "</inkscape-extension>", new Svg()); /* SVG out */ - ext = Inkscape::Extension::build_from_mem( + Inkscape::Extension::build_from_mem( "<inkscape-extension xmlns=\"" INKSCAPE_EXTENSION_URI "\">\n" "<name>" N_("SVG Output") "</name>\n" "<id>" SP_MODULE_KEY_OUTPUT_SVG "</id>\n" diff --git a/src/extension/internal/svgz.cpp b/src/extension/internal/svgz.cpp index fceafd3ee..be9440980 100644 --- a/src/extension/internal/svgz.cpp +++ b/src/extension/internal/svgz.cpp @@ -40,10 +40,8 @@ namespace Internal { void Svgz::init(void) { - Inkscape::Extension::Extension * ext; - /* SVGZ in */ - ext = Inkscape::Extension::build_from_mem( + Inkscape::Extension::build_from_mem( "<inkscape-extension xmlns=\"" INKSCAPE_EXTENSION_URI "\">\n" "<name>" N_("SVGZ Input") "</name>\n" "<id>" SP_MODULE_KEY_INPUT_SVGZ "</id>\n" @@ -57,8 +55,8 @@ Svgz::init(void) "</input>\n" "</inkscape-extension>", new Svgz()); - /* SVGZ out Inkscape */ - ext = Inkscape::Extension::build_from_mem( + /* SVGZ out Inkscape */ + Inkscape::Extension::build_from_mem( "<inkscape-extension xmlns=\"" INKSCAPE_EXTENSION_URI "\">\n" "<name>" N_("SVGZ Output") "</name>\n" "<id>" SP_MODULE_KEY_OUTPUT_SVGZ_INKSCAPE "</id>\n" @@ -71,8 +69,8 @@ Svgz::init(void) "</output>\n" "</inkscape-extension>", new Svgz()); - /* SVGZ out */ - ext = Inkscape::Extension::build_from_mem( + /* SVGZ out */ + Inkscape::Extension::build_from_mem( "<inkscape-extension xmlns=\"" INKSCAPE_EXTENSION_URI "\">\n" "<name>" N_("SVGZ Output") "</name>\n" "<id>" SP_MODULE_KEY_OUTPUT_SVGZ "</id>\n" diff --git a/src/livarot/ShapeMisc.cpp b/src/livarot/ShapeMisc.cpp index da268910f..7b170e8a0 100644 --- a/src/livarot/ShapeMisc.cpp +++ b/src/livarot/ShapeMisc.cpp @@ -584,15 +584,13 @@ Shape::MakeTweak (int mode, Shape *a, double power, JoinType join, double miter, enB = a->CyclePrevAt (a->getEdge(i).en, i); } - Geom::Point stD, seD, enD; - double stL, seL, enL; - stD = a->getEdge(stB).dx; - seD = a->getEdge(i).dx; - enD = a->getEdge(enB).dx; + Geom::Point stD = a->getEdge(stB).dx; + Geom::Point seD = a->getEdge(i).dx; + Geom::Point enD = a->getEdge(enB).dx; - stL = sqrt (dot(stD,stD)); - seL = sqrt (dot(seD,seD)); - enL = sqrt (dot(enD,enD)); + double stL = sqrt (dot(stD,stD)); + double seL = sqrt (dot(seD,seD)); + //double enL = sqrt (dot(enD,enD)); MiscNormalize (stD); MiscNormalize (enD); MiscNormalize (seD); @@ -778,15 +776,13 @@ Shape::MakeOffset (Shape * a, double dec, JoinType join, double miter, bool do_p enB = a->CycleNextAt (a->getEdge(i).en, i); } - Geom::Point stD, seD, enD; - double stL, seL, enL; - stD = a->getEdge(stB).dx; - seD = a->getEdge(i).dx; - enD = a->getEdge(enB).dx; + Geom::Point stD = a->getEdge(stB).dx; + Geom::Point seD = a->getEdge(i).dx; + Geom::Point enD = a->getEdge(enB).dx; - stL = sqrt (dot(stD,stD)); - seL = sqrt (dot(seD,seD)); - enL = sqrt (dot(enD,enD)); + double stL = sqrt (dot(stD,stD)); + double seL = sqrt (dot(seD,seD)); + //double enL = sqrt (dot(enD,enD)); MiscNormalize (stD); MiscNormalize (enD); MiscNormalize (seD); diff --git a/src/live_effects/lpe-knot.cpp b/src/live_effects/lpe-knot.cpp index 7a66b80c9..7ec103a85 100644 --- a/src/live_effects/lpe-knot.cpp +++ b/src/live_effects/lpe-knot.cpp @@ -94,7 +94,8 @@ findShadowedTime(Geom::Path const &patha, std::vector<Geom::Point> const &pt_and using namespace Geom; Point T = unit_vector(pt_and_dir[1]); Point N = T.cw(); - Point A = pt_and_dir[0]-3*width*T, B = A+6*width*T; + //Point A = pt_and_dir[0] - 3 * width * T; + //Point B = A+6*width*T; Affine mat = from_basis( T, N, pt_and_dir[0] ); mat = mat.inverse(); diff --git a/src/live_effects/lpe-rough-hatches.cpp b/src/live_effects/lpe-rough-hatches.cpp index f9ab72373..fb3d143aa 100644 --- a/src/live_effects/lpe-rough-hatches.cpp +++ b/src/live_effects/lpe-rough-hatches.cpp @@ -440,8 +440,8 @@ LPERoughHatches::smoothSnake(std::vector<std::vector<Point> > const &linearSnake for (unsigned comp=0; comp<linearSnake.size(); comp++){ if (linearSnake[comp].size()>=2){ Point last_pt = linearSnake[comp][0]; - Point last_top = linearSnake[comp][0]; - Point last_bot = linearSnake[comp][0]; + //Point last_top = linearSnake[comp][0]; + //Point last_bot = linearSnake[comp][0]; Point last_hdle = linearSnake[comp][0]; Point last_top_hdle = linearSnake[comp][0]; Point last_bot_hdle = linearSnake[comp][0]; @@ -482,8 +482,8 @@ LPERoughHatches::smoothSnake(std::vector<std::vector<Point> > const &linearSnake if ( fat_output.get_value() ){ //double scaled_width = double((is_top ? stroke_width_top : stroke_width_bot))/(pt1[X]-pt0[X]); - double scaled_width = 1./(pt1[X]-pt0[X]); - Point hdle_offset = (pt1-pt0)*scaled_width; + //double scaled_width = 1./(pt1[X]-pt0[X]); + //Point hdle_offset = (pt1-pt0)*scaled_width; Point inside = new_pt; Point inside_hdle_in; Point inside_hdle_out; diff --git a/src/widgets/paint-selector.cpp b/src/widgets/paint-selector.cpp index 3f34c8ad1..ef82669b9 100644 --- a/src/widgets/paint-selector.cpp +++ b/src/widgets/paint-selector.cpp @@ -445,9 +445,9 @@ void SPPaintSelector::setColorAlpha(SPColor const &color, float alpha) { g_return_if_fail( ( 0.0 <= alpha ) && ( alpha <= 1.0 ) ); SPColorSelector *csel = 0; +/* guint32 rgba = 0; -/* if ( sp_color_get_colorspace_type(color) == SP_COLORSPACE_TYPE_CMYK ) { #ifdef SP_PS_VERBOSE @@ -465,7 +465,7 @@ void SPPaintSelector::setColorAlpha(SPColor const &color, float alpha) } csel = reinterpret_cast<SPColorSelector*>(g_object_get_data(G_OBJECT(selector), "color-selector")); - rgba = color.toRGBA32( alpha ); + //rgba = color.toRGBA32( alpha ); csel->base->setColorAlpha( color, alpha ); } |
