From: joncruz Date: Mon, 19 Feb 2007 18:10:02 +0000 (+0000) Subject: Fixed unintialized variables and minor misc warnings X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=02493e1d76c38beb15fee20374afb956e77a677c;p=inkscape.git Fixed unintialized variables and minor misc warnings --- diff --git a/src/extension/internal/cairo-render-context.cpp b/src/extension/internal/cairo-render-context.cpp index 4ade7fbae..47d38fa1d 100644 --- a/src/extension/internal/cairo-render-context.cpp +++ b/src/extension/internal/cairo-render-context.cpp @@ -408,8 +408,8 @@ CairoRenderContext::popLayer(void) SPMask *mask = _state->mask; if (clip_path || mask) { - CairoRenderContext *clip_ctx; - cairo_surface_t *clip_mask; + CairoRenderContext *clip_ctx = 0; + cairo_surface_t *clip_mask = 0; if (clip_path) { if (_render_mode == RENDER_MODE_CLIP) @@ -1313,7 +1313,11 @@ CairoRenderContext::renderGlyphtext(PangoFont *font, NRMatrix const *font_matrix cairo_restore(_cr); cairo_font_face_destroy(font_face); -#endif +#else + (void)size; + (void)fc_pattern; +#endif + return true; } diff --git a/src/extension/paramenum.cpp b/src/extension/paramenum.cpp index bd8d0b14e..1e95a18f0 100644 --- a/src/extension/paramenum.cpp +++ b/src/extension/paramenum.cpp @@ -219,7 +219,7 @@ ParamComboBox::get_widget (SPDocument * doc, Inkscape::XML::Node * node) ParamComboBoxEntry * combo = Gtk::manage(new ParamComboBoxEntry(this, doc, node)); // add choice strings: - Glib::ustring * settext; + Glib::ustring * settext = 0; for (GSList * list = choices; list != NULL; list = g_slist_next(list)) { enumentry * entr = reinterpret_cast(list->data); Glib::ustring * text = entr->guitext; diff --git a/src/livarot/Shape.cpp b/src/livarot/Shape.cpp index 1a2f63871..c694cdd27 100644 --- a/src/livarot/Shape.cpp +++ b/src/livarot/Shape.cpp @@ -51,7 +51,7 @@ Shape::~Shape (void) void Shape::Affiche(void) { - printf("sh=%p nbPt=%i nbAr=%i\n",this, _pts.size(), _aretes.size()); // localizing ok + printf("sh=%p nbPt=%i nbAr=%i\n", this, static_cast(_pts.size()), static_cast(_aretes.size())); // localizing ok for (unsigned int i=0; i<_pts.size(); i++) { printf("pt %i : x=(%f %f) dI=%i dO=%i\n",i, _pts[i].x[0], _pts[i].x[1], _pts[i].dI, _pts[i].dO); // localizing ok } diff --git a/src/snap.cpp b/src/snap.cpp index de74d6cc6..253066ca4 100644 --- a/src/snap.cpp +++ b/src/snap.cpp @@ -27,7 +27,12 @@ * \param v `Owning' SPNamedView. */ -SnapManager::SnapManager(SPNamedView const *v) : _named_view(v), grid(v, 0), axonomgrid(v, 0), guide(v, 0), object(v, 0) +SnapManager::SnapManager(SPNamedView const *v) : + grid(v, 0), + axonomgrid(v, 0), + guide(v, 0), + object(v, 0), + _named_view(v) { } diff --git a/src/sp-feblend.cpp b/src/sp-feblend.cpp index 9fc5ee483..c901d6073 100644 --- a/src/sp-feblend.cpp +++ b/src/sp-feblend.cpp @@ -108,8 +108,9 @@ static void sp_feBlend_set(SPObject *object, unsigned int key, gchar const *value) { SPFeBlend *feBlend = SP_FEBLEND(object); + (void)feBlend; - switch(key) { + switch(key) { /*DEAL WITH SETTING ATTRIBUTES HERE*/ default: if (((SPObjectClass *) feBlend_parent_class)->set) diff --git a/src/sp-fecolormatrix.cpp b/src/sp-fecolormatrix.cpp index 02ba17b0d..f224e9c3c 100644 --- a/src/sp-fecolormatrix.cpp +++ b/src/sp-fecolormatrix.cpp @@ -108,8 +108,9 @@ static void sp_feColorMatrix_set(SPObject *object, unsigned int key, gchar const *value) { SPFeColorMatrix *feColorMatrix = SP_FECOLORMATRIX(object); + (void)feColorMatrix; - switch(key) { + switch(key) { /*DEAL WITH SETTING ATTRIBUTES HERE*/ default: if (((SPObjectClass *) feColorMatrix_parent_class)->set) diff --git a/src/sp-fecomponenttransfer.cpp b/src/sp-fecomponenttransfer.cpp index 739c24cdb..6c228c3fb 100644 --- a/src/sp-fecomponenttransfer.cpp +++ b/src/sp-fecomponenttransfer.cpp @@ -108,8 +108,9 @@ static void sp_feComponentTransfer_set(SPObject *object, unsigned int key, gchar const *value) { SPFeComponentTransfer *feComponentTransfer = SP_FECOMPONENTTRANSFER(object); + (void)feComponentTransfer; - switch(key) { + switch(key) { /*DEAL WITH SETTING ATTRIBUTES HERE*/ default: if (((SPObjectClass *) feComponentTransfer_parent_class)->set) diff --git a/src/sp-fecomposite.cpp b/src/sp-fecomposite.cpp index 9e6411bff..ed127e723 100644 --- a/src/sp-fecomposite.cpp +++ b/src/sp-fecomposite.cpp @@ -108,8 +108,9 @@ static void sp_feComposite_set(SPObject *object, unsigned int key, gchar const *value) { SPFeComposite *feComposite = SP_FECOMPOSITE(object); + (void)feComposite; - switch(key) { + switch(key) { /*DEAL WITH SETTING ATTRIBUTES HERE*/ default: if (((SPObjectClass *) feComposite_parent_class)->set) diff --git a/src/sp-feconvolvematrix.cpp b/src/sp-feconvolvematrix.cpp index f7c50971b..b02f75fd1 100644 --- a/src/sp-feconvolvematrix.cpp +++ b/src/sp-feconvolvematrix.cpp @@ -108,8 +108,9 @@ static void sp_feConvolveMatrix_set(SPObject *object, unsigned int key, gchar const *value) { SPFeConvolveMatrix *feConvolveMatrix = SP_FECONVOLVEMATRIX(object); + (void)feConvolveMatrix; - switch(key) { + switch(key) { /*DEAL WITH SETTING ATTRIBUTES HERE*/ default: if (((SPObjectClass *) feConvolveMatrix_parent_class)->set) diff --git a/src/sp-fediffuselighting.cpp b/src/sp-fediffuselighting.cpp index a84628aa9..beb2d6f14 100644 --- a/src/sp-fediffuselighting.cpp +++ b/src/sp-fediffuselighting.cpp @@ -108,8 +108,9 @@ static void sp_feDiffuseLighting_set(SPObject *object, unsigned int key, gchar const *value) { SPFeDiffuseLighting *feDiffuseLighting = SP_FEDIFFUSELIGHTING(object); + (void)feDiffuseLighting; - switch(key) { + switch(key) { /*DEAL WITH SETTING ATTRIBUTES HERE*/ default: if (((SPObjectClass *) feDiffuseLighting_parent_class)->set) diff --git a/src/sp-fedisplacementmap.cpp b/src/sp-fedisplacementmap.cpp index 51bba62e3..d651a3ab5 100644 --- a/src/sp-fedisplacementmap.cpp +++ b/src/sp-fedisplacementmap.cpp @@ -108,8 +108,9 @@ static void sp_feDisplacementMap_set(SPObject *object, unsigned int key, gchar const *value) { SPFeDisplacementMap *feDisplacementMap = SP_FEDISPLACEMENTMAP(object); + (void)feDisplacementMap; - switch(key) { + switch(key) { /*DEAL WITH SETTING ATTRIBUTES HERE*/ default: if (((SPObjectClass *) feDisplacementMap_parent_class)->set) diff --git a/src/sp-feflood.cpp b/src/sp-feflood.cpp index de7b658d7..843f49da5 100644 --- a/src/sp-feflood.cpp +++ b/src/sp-feflood.cpp @@ -108,8 +108,9 @@ static void sp_feFlood_set(SPObject *object, unsigned int key, gchar const *value) { SPFeFlood *feFlood = SP_FEFLOOD(object); + (void)feFlood; - switch(key) { + switch(key) { /*DEAL WITH SETTING ATTRIBUTES HERE*/ default: if (((SPObjectClass *) feFlood_parent_class)->set) diff --git a/src/sp-feimage.cpp b/src/sp-feimage.cpp index b7c857d4e..aeacdcef2 100644 --- a/src/sp-feimage.cpp +++ b/src/sp-feimage.cpp @@ -109,8 +109,9 @@ static void sp_feImage_set(SPObject *object, unsigned int key, gchar const *value) { SPFeImage *feImage = SP_FEIMAGE(object); + (void)feImage; - switch(key) { + switch(key) { /*DEAL WITH SETTING ATTRIBUTES HERE*/ default: if (((SPObjectClass *) feImage_parent_class)->set) diff --git a/src/sp-femerge.cpp b/src/sp-femerge.cpp index 830fe21e4..64c01432c 100644 --- a/src/sp-femerge.cpp +++ b/src/sp-femerge.cpp @@ -108,8 +108,9 @@ static void sp_feMerge_set(SPObject *object, unsigned int key, gchar const *value) { SPFeMerge *feMerge = SP_FEMERGE(object); + (void)feMerge; - switch(key) { + switch(key) { /*DEAL WITH SETTING ATTRIBUTES HERE*/ default: if (((SPObjectClass *) feMerge_parent_class)->set) diff --git a/src/sp-femorphology.cpp b/src/sp-femorphology.cpp index a7497560c..eed1f7602 100644 --- a/src/sp-femorphology.cpp +++ b/src/sp-femorphology.cpp @@ -108,8 +108,9 @@ static void sp_feMorphology_set(SPObject *object, unsigned int key, gchar const *value) { SPFeMorphology *feMorphology = SP_FEMORPHOLOGY(object); + (void)feMorphology; - switch(key) { + switch(key) { /*DEAL WITH SETTING ATTRIBUTES HERE*/ default: if (((SPObjectClass *) feMorphology_parent_class)->set) diff --git a/src/sp-feoffset.cpp b/src/sp-feoffset.cpp index 0f2f05062..b766f5224 100644 --- a/src/sp-feoffset.cpp +++ b/src/sp-feoffset.cpp @@ -108,8 +108,9 @@ static void sp_feOffset_set(SPObject *object, unsigned int key, gchar const *value) { SPFeOffset *feOffset = SP_FEOFFSET(object); + (void)feOffset; - switch(key) { + switch(key) { /*DEAL WITH SETTING ATTRIBUTES HERE*/ default: if (((SPObjectClass *) feOffset_parent_class)->set) diff --git a/src/sp-fespecularlighting.cpp b/src/sp-fespecularlighting.cpp index d03d8bf06..b1ef987e1 100644 --- a/src/sp-fespecularlighting.cpp +++ b/src/sp-fespecularlighting.cpp @@ -108,8 +108,9 @@ static void sp_feSpecularLighting_set(SPObject *object, unsigned int key, gchar const *value) { SPFeSpecularLighting *feSpecularLighting = SP_FESPECULARLIGHTING(object); + (void)feSpecularLighting; - switch(key) { + switch(key) { /*DEAL WITH SETTING ATTRIBUTES HERE*/ default: if (((SPObjectClass *) feSpecularLighting_parent_class)->set) diff --git a/src/sp-fetile.cpp b/src/sp-fetile.cpp index a00bdd1e1..7d33cd502 100644 --- a/src/sp-fetile.cpp +++ b/src/sp-fetile.cpp @@ -108,8 +108,9 @@ static void sp_feTile_set(SPObject *object, unsigned int key, gchar const *value) { SPFeTile *feTile = SP_FETILE(object); + (void)feTile; - switch(key) { + switch(key) { /*DEAL WITH SETTING ATTRIBUTES HERE*/ default: if (((SPObjectClass *) feTile_parent_class)->set) diff --git a/src/sp-feturbulence.cpp b/src/sp-feturbulence.cpp index b1bfea613..033dfd7e4 100644 --- a/src/sp-feturbulence.cpp +++ b/src/sp-feturbulence.cpp @@ -108,8 +108,9 @@ static void sp_feTurbulence_set(SPObject *object, unsigned int key, gchar const *value) { SPFeTurbulence *feTurbulence = SP_FETURBULENCE(object); + (void)feTurbulence; - switch(key) { + switch(key) { /*DEAL WITH SETTING ATTRIBUTES HERE*/ default: if (((SPObjectClass *) feTurbulence_parent_class)->set) diff --git a/src/sp-filter-primitive.cpp b/src/sp-filter-primitive.cpp index 8553b9050..8a098de12 100644 --- a/src/sp-filter-primitive.cpp +++ b/src/sp-filter-primitive.cpp @@ -110,6 +110,7 @@ static void sp_filter_primitive_set(SPObject *object, unsigned int key, gchar const *value) { SPFilterPrimitive *filter_primitive = SP_FILTER_PRIMITIVE(object); + (void)filter_primitive; /* See if any parents need this value. */ if (((SPObjectClass *) filter_primitive_parent_class)->set) {