From: joncruz Date: Fri, 1 Aug 2008 04:22:35 +0000 (+0000) Subject: Warning cleanup X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=5cd969f185e1a05f873e023378d0831e71441da6;p=inkscape.git Warning cleanup --- diff --git a/src/dialogs/swatches.cpp b/src/dialogs/swatches.cpp index 2987b3212..21889179f 100644 --- a/src/dialogs/swatches.cpp +++ b/src/dialogs/swatches.cpp @@ -240,7 +240,7 @@ static void handleSecondaryClick( GtkWidget* widget, gint arg1, gpointer callbac } } -static gboolean handleEnterNotify( GtkWidget* widget, GdkEventCrossing* event, gpointer callback_data ) { +static gboolean handleEnterNotify( GtkWidget* /*widget*/, GdkEventCrossing* /*event*/, gpointer callback_data ) { ColorItem* item = reinterpret_cast(callback_data); if ( item ) { SPDesktop *desktop = SP_ACTIVE_DESKTOP; @@ -254,7 +254,7 @@ static gboolean handleEnterNotify( GtkWidget* widget, GdkEventCrossing* event, g return FALSE; } -static gboolean handleLeaveNotify( GtkWidget* widget, GdkEventCrossing* event, gpointer callback_data ) { +static gboolean handleLeaveNotify( GtkWidget* /*widget*/, GdkEventCrossing* /*event*/, gpointer callback_data ) { ColorItem* item = reinterpret_cast(callback_data); if ( item ) { SPDesktop *desktop = SP_ACTIVE_DESKTOP; diff --git a/src/display/bezier-utils-test.cpp b/src/display/bezier-utils-test.cpp index d42672113..edeb9e3b7 100644 --- a/src/display/bezier-utils-test.cpp +++ b/src/display/bezier-utils-test.cpp @@ -82,7 +82,7 @@ static void compare_rms(Point const est_b[], double const t[], Point const d[], } } -int main(int argc, char *argv[]) { +int main(int /*argc*/, char */*argv*/[]) { utest_start("bezier-utils.cpp"); UTEST_TEST("copy_without_nans_or_adjacent_duplicates") { diff --git a/src/extension/internal/pov-out.cpp b/src/extension/internal/pov-out.cpp index d1a8e833c..b5c7cc6a3 100644 --- a/src/extension/internal/pov-out.cpp +++ b/src/extension/internal/pov-out.cpp @@ -304,7 +304,7 @@ void PovOutput::doCurves(SPDocument *doc) SPCurve *curve = shape->curve; if (curve->is_empty()) continue; - + nrShapes++; PovShapeInfo shapeInfo; @@ -384,7 +384,7 @@ void PovOutput::doCurves(SPDocument *doc) g_error ("logical error, because pathv_to_linear_and_cubic_beziers was used"); } - if (segmentNr <= segmentCount) + if (segmentNr <= static_cast(segmentCount)) out(",\n"); else out("\n"); @@ -400,7 +400,7 @@ void PovOutput::doCurves(SPDocument *doc) double cmaxx = cminmax.max()[X]; double cminy = cminmax.min()[Y]; double cmaxy = cminmax.max()[Y]; - + //# prefix for following declarations char *pfx = (char *)id.c_str(); @@ -553,9 +553,9 @@ void PovOutput::saveDocument(SPDocument *doc, gchar const *uri) outbuf.clear(); doHeader(); - + outbuf.append(curveBuf); - + doTail(); @@ -572,7 +572,7 @@ void PovOutput::saveDocument(SPDocument *doc, gchar const *uri) int ch = *iter; fputc(ch, f); } - + fclose(f); } diff --git a/src/helper/units-test.cpp b/src/helper/units-test.cpp index 1a983fece..a400ca01f 100644 --- a/src/helper/units-test.cpp +++ b/src/helper/units-test.cpp @@ -93,7 +93,7 @@ test_unit_table() } int -main(int argc, char *argv[]) +main(int /*argc*/, char */*argv*/[]) { int const ret = ( ( test_conversions() && test_unit_table() ) diff --git a/src/knotholder.cpp b/src/knotholder.cpp index ae9737b32..df50b9ff5 100644 --- a/src/knotholder.cpp +++ b/src/knotholder.cpp @@ -127,7 +127,7 @@ KnotHolder::knot_clicked_handler(SPKnot *knot, guint state) } // for drag, this is done by ungrabbed_handler, but for click we must do it here - sp_document_done(SP_OBJECT_DOCUMENT(item), object_verb, + sp_document_done(SP_OBJECT_DOCUMENT(item), object_verb, _("Change handle")); } @@ -154,7 +154,7 @@ KnotHolder::knot_moved_handler(SPKnot *knot, NR::Point const *p, guint state) } void -KnotHolder::knot_ungrabbed_handler(SPKnot *knot) +KnotHolder::knot_ungrabbed_handler(SPKnot */*knot*/) { if (this->released) { this->released(this->item); @@ -199,7 +199,7 @@ KnotHolder::knot_ungrabbed_handler(SPKnot *knot) else object_verb = SP_VERB_SELECTION_DYNAMIC_OFFSET; } - + sp_document_done(SP_OBJECT_DOCUMENT (object), object_verb, _("Move handle")); } diff --git a/src/libnr/in-svg-plane-test.cpp b/src/libnr/in-svg-plane-test.cpp index 061333cbb..112dfaedf 100644 --- a/src/libnr/in-svg-plane-test.cpp +++ b/src/libnr/in-svg-plane-test.cpp @@ -5,7 +5,7 @@ #include "utest/utest.h" #include "2geom/isnan.h" -int main(int argc, char *argv[]) +int main(int /*argc*/, char */*argv*/[]) { utest_start("in-svg-plane.h"); diff --git a/src/libnr/nr-matrix-test.cpp b/src/libnr/nr-matrix-test.cpp index c457f9666..610ebb750 100644 --- a/src/libnr/nr-matrix-test.cpp +++ b/src/libnr/nr-matrix-test.cpp @@ -22,7 +22,7 @@ inline bool point_equalp(NR::Point const &a, NR::Point const &b) NR_DF_TEST_CLOSE(a[Y], b[Y], 1e-5) ); } -int main(int argc, char *argv[]) +int main(int /*argc*/, char */*argv*/[]) { int rc = EXIT_SUCCESS; diff --git a/src/libnr/nr-point-fns-test.cpp b/src/libnr/nr-point-fns-test.cpp index 312055fee..0ceb19ac0 100644 --- a/src/libnr/nr-point-fns-test.cpp +++ b/src/libnr/nr-point-fns-test.cpp @@ -9,7 +9,7 @@ using NR::Point; -int main(int argc, char *argv[]) +int main(int /*argc*/, char */*argv*/[]) { utest_start("nr-point-fns"); diff --git a/src/libnr/nr-rotate-fns-test.cpp b/src/libnr/nr-rotate-fns-test.cpp index 45b2450e0..fb7df7eef 100644 --- a/src/libnr/nr-rotate-fns-test.cpp +++ b/src/libnr/nr-rotate-fns-test.cpp @@ -4,7 +4,7 @@ #include #include -int main(int argc, char *argv[]) +int main(int /*argc*/, char */*argv*/[]) { utest_start("rotate-fns"); diff --git a/src/libnr/nr-rotate-test.cpp b/src/libnr/nr-rotate-test.cpp index 63b9d1737..b44562500 100644 --- a/src/libnr/nr-rotate-test.cpp +++ b/src/libnr/nr-rotate-test.cpp @@ -11,7 +11,7 @@ using NR::X; using NR::Y; -int main(int argc, char *argv[]) +int main(int /*argc*/, char */*argv*/[]) { utest_start("rotate"); diff --git a/src/libnr/nr-scale-test.cpp b/src/libnr/nr-scale-test.cpp index cc255d02a..6bc79917d 100644 --- a/src/libnr/nr-scale-test.cpp +++ b/src/libnr/nr-scale-test.cpp @@ -4,7 +4,7 @@ using NR::X; using NR::Y; -int main(int argc, char *argv[]) +int main(int /*argc*/, char */*argv*/[]) { utest_start("NR::scale"); diff --git a/src/libnr/nr-translate-test.cpp b/src/libnr/nr-translate-test.cpp index 9e1ef1166..7896315c1 100644 --- a/src/libnr/nr-translate-test.cpp +++ b/src/libnr/nr-translate-test.cpp @@ -10,7 +10,7 @@ using NR::X; using NR::Y; -int main(int argc, char *argv[]) +int main(int /*argc*/, char */*argv*/[]) { utest_start("translate"); diff --git a/src/libnr/nr-types-test.cpp b/src/libnr/nr-types-test.cpp index 87a35fc68..153ca7910 100644 --- a/src/libnr/nr-types-test.cpp +++ b/src/libnr/nr-types-test.cpp @@ -7,7 +7,7 @@ using NR::X; using NR::Y; -int main(int argc, char *argv[]) { +int main(int /*argc*/, char */*argv*/[]) { utest_start("Basic NR::Point operations"); UTEST_TEST("X,Y values") { diff --git a/src/live_effects/effect.cpp b/src/live_effects/effect.cpp index b0cebab8d..555b9d32d 100644 --- a/src/live_effects/effect.cpp +++ b/src/live_effects/effect.cpp @@ -497,7 +497,7 @@ Effect::getHelperPaths(SPLPEItem *lpeitem) * This function should be overwritten by derived effects if they want to provide their own helperpaths. */ void -Effect::addCanvasIndicators(SPLPEItem *lpeitem, std::vector &hp_vec) +Effect::addCanvasIndicators(SPLPEItem */*lpeitem*/, std::vector &/*hp_vec*/) { } diff --git a/src/live_effects/parameter/parameter.h b/src/live_effects/parameter/parameter.h index 8c24c50de..aac3dfa69 100644 --- a/src/live_effects/parameter/parameter.h +++ b/src/live_effects/parameter/parameter.h @@ -60,8 +60,8 @@ public: virtual Glib::ustring * param_getTooltip() { return ¶m_tooltip; }; // overload these for your particular parameter to make it provide knotholder handles or canvas helperpaths - virtual void addKnotHolderEntities(KnotHolder *knotholder, SPDesktop *desktop, SPItem *item) {} - virtual void addCanvasIndicators(SPLPEItem *lpeitem, std::vector &hp_vec) {}; + virtual void addKnotHolderEntities(KnotHolder */*knotholder*/, SPDesktop */*desktop*/, SPItem */*item*/) {} + virtual void addCanvasIndicators(SPLPEItem */*lpeitem*/, std::vector &/*hp_vec*/) {}; virtual void param_editOncanvas(SPItem * /*item*/, SPDesktop * /*dt*/) {}; virtual void param_setup_nodepath(Inkscape::NodePath::Path */*np*/) {}; diff --git a/src/live_effects/parameter/path.cpp b/src/live_effects/parameter/path.cpp index 2d659c2c7..e74729b35 100644 --- a/src/live_effects/parameter/path.cpp +++ b/src/live_effects/parameter/path.cpp @@ -218,7 +218,7 @@ PathParam::param_setup_nodepath(Inkscape::NodePath::Path *np) } void -PathParam::addCanvasIndicators(SPLPEItem *lpeitem, std::vector &hp_vec) +PathParam::addCanvasIndicators(SPLPEItem */*lpeitem*/, std::vector &hp_vec) { hp_vec.push_back(_pathvector); } diff --git a/src/live_effects/parameter/text.cpp b/src/live_effects/parameter/text.cpp index dea750091..5ba4bcfc7 100644 --- a/src/live_effects/parameter/text.cpp +++ b/src/live_effects/parameter/text.cpp @@ -52,7 +52,7 @@ TextParam::setPos(Geom::Point pos) void TextParam::setPosAndAnchor(const Geom::Piecewise > &pwd2, - const double t, const double length, bool use_curvature) + const double t, const double length, bool /*use_curvature*/) { using namespace Geom; diff --git a/src/live_effects/parameter/text.h b/src/live_effects/parameter/text.h index be42cffbc..7ce525542 100644 --- a/src/live_effects/parameter/text.h +++ b/src/live_effects/parameter/text.h @@ -70,7 +70,7 @@ public: TextParamInternal(Effect* effect) : TextParam("", "", "", NULL, effect) {} - virtual Gtk::Widget * param_newWidget(Gtk::Tooltips * tooltips) { return NULL; } + virtual Gtk::Widget * param_newWidget(Gtk::Tooltips * /*tooltips*/) { return NULL; } }; } //namespace LivePathEffect diff --git a/src/sp-script.cpp b/src/sp-script.cpp index 48247ecad..2b855e455 100644 --- a/src/sp-script.cpp +++ b/src/sp-script.cpp @@ -69,15 +69,15 @@ static void sp_script_release(SPObject *object) } } -static void sp_script_update(SPObject *object, SPCtx *ctx, guint flags) +static void sp_script_update(SPObject */*object*/, SPCtx */*ctx*/, guint /*flags*/) { } -static void sp_script_modified(SPObject *object, guint flags) +static void sp_script_modified(SPObject */*object*/, guint /*flags*/) { } -static Inkscape::XML::Node *sp_script_write(SPObject *object, Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) +static Inkscape::XML::Node *sp_script_write(SPObject */*object*/, Inkscape::XML::Document */*xml_doc*/, Inkscape::XML::Node *repr, guint /*flags*/) { /* TODO: diff --git a/src/util/list-container-test.cpp b/src/util/list-container-test.cpp index e309677c0..45db65e33 100644 --- a/src/util/list-container-test.cpp +++ b/src/util/list-container-test.cpp @@ -26,7 +26,7 @@ static bool check_values(ListContainer const &c, unsigned n_values, ...) { return ret && n_values == 0 && iter == c.end(); } -int main(int argc, char *argv[]) { +int main(int /*argc*/, char */*argv*/[]) { Inkscape::GC::init(); utest_start("List Container"); UTEST_TEST("range constructor") { diff --git a/src/widgets/sp-xmlview-tree.cpp b/src/widgets/sp-xmlview-tree.cpp index 5057e724a..293f7aa13 100644 --- a/src/widgets/sp-xmlview-tree.cpp +++ b/src/widgets/sp-xmlview-tree.cpp @@ -245,7 +245,7 @@ node_data_free (gpointer ptr) { } void -element_child_added (Inkscape::XML::Node * repr, Inkscape::XML::Node * child, Inkscape::XML::Node * ref, gpointer ptr) +element_child_added (Inkscape::XML::Node * /*repr*/, Inkscape::XML::Node * child, Inkscape::XML::Node * ref, gpointer ptr) { NodeData * data; GtkCTreeNode * before; @@ -260,7 +260,7 @@ element_child_added (Inkscape::XML::Node * repr, Inkscape::XML::Node * child, In } void -element_attr_changed (Inkscape::XML::Node * repr, const gchar * key, const gchar * old_value, const gchar * new_value, bool is_interactive, gpointer ptr) +element_attr_changed (Inkscape::XML::Node * repr, const gchar * key, const gchar * /*old_value*/, const gchar * new_value, bool /*is_interactive*/, gpointer ptr) { NodeData * data; gchar *label; @@ -270,7 +270,7 @@ element_attr_changed (Inkscape::XML::Node * repr, const gchar * key, const gchar if (data->tree->blocked) return; if (strcmp (key, "id")) return; - + if (new_value) { label = g_strdup_printf ("<%s id=\"%s\">", repr->name(), new_value); } else { @@ -281,7 +281,7 @@ element_attr_changed (Inkscape::XML::Node * repr, const gchar * key, const gchar } void -element_child_removed (Inkscape::XML::Node * repr, Inkscape::XML::Node * child, Inkscape::XML::Node * ref, gpointer ptr) +element_child_removed (Inkscape::XML::Node * /*repr*/, Inkscape::XML::Node * child, Inkscape::XML::Node * /*ref*/, gpointer ptr) { NodeData * data; @@ -293,7 +293,7 @@ element_child_removed (Inkscape::XML::Node * repr, Inkscape::XML::Node * child, } void -element_order_changed (Inkscape::XML::Node * repr, Inkscape::XML::Node * child, Inkscape::XML::Node * oldref, Inkscape::XML::Node * newref, gpointer ptr) +element_order_changed (Inkscape::XML::Node * /*repr*/, Inkscape::XML::Node * child, Inkscape::XML::Node * /*oldref*/, Inkscape::XML::Node * newref, gpointer ptr) { NodeData * data; GtkCTreeNode * before, * node; @@ -311,7 +311,7 @@ element_order_changed (Inkscape::XML::Node * repr, Inkscape::XML::Node * child, } void -text_content_changed (Inkscape::XML::Node * repr, const gchar * old_content, const gchar * new_content, gpointer ptr) +text_content_changed (Inkscape::XML::Node * /*repr*/, const gchar * /*old_content*/, const gchar * new_content, gpointer ptr) { NodeData *data; gchar *label; @@ -326,7 +326,7 @@ text_content_changed (Inkscape::XML::Node * repr, const gchar * old_content, con } void -comment_content_changed (Inkscape::XML::Node *repr, const gchar * old_content, const gchar *new_content, gpointer ptr) +comment_content_changed (Inkscape::XML::Node */*repr*/, const gchar * /*old_content*/, const gchar *new_content, gpointer ptr) { NodeData *data; gchar *label; @@ -341,7 +341,7 @@ comment_content_changed (Inkscape::XML::Node *repr, const gchar * old_content, c } void -pi_content_changed(Inkscape::XML::Node *repr, const gchar * old_content, const gchar *new_content, gpointer ptr) +pi_content_changed(Inkscape::XML::Node *repr, const gchar * /*old_content*/, const gchar *new_content, gpointer ptr) { NodeData *data; gchar *label; @@ -386,7 +386,7 @@ ref_to_sibling (GtkCTreeNode * parent, Inkscape::XML::Node * ref) { if (ref) { GtkCTreeNode * before; - before = repr_to_child (parent, ref); + before = repr_to_child (parent, ref); g_assert (before != NULL); before = GTK_CTREE_ROW (before)->sibling; return before; @@ -419,7 +419,7 @@ sibling_to_ref (GtkCTreeNode * parent, GtkCTreeNode * sibling) } gboolean -check_drag (GtkCTree * tree, GtkCTreeNode * node, GtkCTreeNode * new_parent, GtkCTreeNode * new_sibling) +check_drag (GtkCTree * /*tree*/, GtkCTreeNode * node, GtkCTreeNode * new_parent, GtkCTreeNode * /*new_sibling*/) { GtkCTreeNode * old_parent; @@ -434,7 +434,7 @@ check_drag (GtkCTree * tree, GtkCTreeNode * node, GtkCTreeNode * new_parent, Gtk } Inkscape::XML::Node * -sp_xmlview_tree_node_get_repr (SPXMLViewTree * tree, GtkCTreeNode * node) +sp_xmlview_tree_node_get_repr (SPXMLViewTree * /*tree*/, GtkCTreeNode * node) { return NODE_DATA (node)->repr; } diff --git a/src/xml/repr-action-test.cpp b/src/xml/repr-action-test.cpp index 9b0ccf5da..d4f9d094d 100644 --- a/src/xml/repr-action-test.cpp +++ b/src/xml/repr-action-test.cpp @@ -8,7 +8,7 @@ int sp_main_gui (int, char const**) { return 0; } int sp_main_console (int, char const**) { return 0; } -int main(int argc, char *argv[]) { +int main(int /*argc*/, char */*argv*/[]) { Inkscape::XML::Document *document; Inkscape::XML::Node *a, *b, *c, *root;