From: joncruz Date: Sat, 15 Dec 2007 19:55:32 +0000 (+0000) Subject: Warning cleanup X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=67f112a66b477fe7fb28c644a4deaf0793533838;p=inkscape.git Warning cleanup --- diff --git a/src/box3d-context.cpp b/src/box3d-context.cpp index 858e7fc57..f66647ef7 100644 --- a/src/box3d-context.cpp +++ b/src/box3d-context.cpp @@ -612,7 +612,7 @@ static gint sp_box3d_context_root_handler(SPEventContext *event_context, GdkEven return ret; } -static void sp_box3d_drag(Box3DContext &bc, guint state) +static void sp_box3d_drag(Box3DContext &bc, guint /*state*/) { SPDesktop *desktop = SP_EVENT_CONTEXT(&bc)->desktop; diff --git a/src/box3d-side.cpp b/src/box3d-side.cpp index ee449be47..9c61a0fce 100644 --- a/src/box3d-side.cpp +++ b/src/box3d-side.cpp @@ -42,7 +42,7 @@ static void box3d_side_update (SPObject *object, SPCtx *ctx, guint flags); static void box3d_side_apply_style (Box3DSide *side); static Proj::Pt3 box3d_side_corner (Box3DSide *side, guint index); static std::vector box3d_side_corners (Box3DSide *side); -static gint box3d_side_descr_to_id (gchar const *descr); +// static gint box3d_side_descr_to_id (gchar const *descr); static SPShapeClass *parent_class; @@ -286,6 +286,7 @@ box3d_side_set_shape (SPShape *shape) } Inkscape::XML::Node *repr = SP_OBJECT_REPR (shape); + (void)repr; Persp3D *persp = box3d_side_perspective(side); //g_return_if_fail (persp != NULL); if (!persp) { @@ -392,6 +393,7 @@ box3d_side_corners (Box3DSide *side) { return corners; } +/* static gint box3d_side_descr_to_id (gchar const *descr) { @@ -406,6 +408,7 @@ box3d_side_descr_to_id (gchar const *descr) g_print (" (description is: %s)\n", descr); return -1; } +*/ Persp3D * box3d_side_perspective(Box3DSide *side) { diff --git a/src/box3d.cpp b/src/box3d.cpp index 038a6b06b..0f8abd71d 100644 --- a/src/box3d.cpp +++ b/src/box3d.cpp @@ -343,7 +343,7 @@ box3d_position_set (SPBox3D *box) } static NR::Matrix -box3d_set_transform(SPItem *item, NR::Matrix const &xform) +box3d_set_transform(SPItem */*item*/, NR::Matrix const &xform) { /* check whether we need to unlink any boxes from their perspectives */ std::set p_sel = persp3d_currently_selected_persps(inkscape_active_event_context()); @@ -398,14 +398,14 @@ box3d_set_transform(SPItem *item, NR::Matrix const &xform) * Gets called when persp(?) repr contents change: i.e. parameter change. */ static void -box3d_ref_modified(SPObject *href, guint flags, SPBox3D *box) +box3d_ref_modified(SPObject */*href*/, guint /*flags*/, SPBox3D */*box*/) { /*** g_print ("FIXME: box3d_ref_modified was called. What should we do?\n"); g_print ("Here is at least the the href's id: %s\n", SP_OBJECT_REPR(href)->attribute("id")); g_print (" ... and the box's, too: %s\n", SP_OBJECT_REPR(box)->attribute("id")); ***/ - + } Proj::Pt3 @@ -454,7 +454,7 @@ box3d_get_center_screen (SPBox3D *box) { return box->persp_ref->getObject()->tmat.image(proj_center).affine(); } -/* +/* * To keep the snappoint from jumping randomly between the two lines when the mouse pointer is close to * their intersection, we remember the last snapped line and keep snapping to this specific line as long * as the distance from the intersection to the mouse pointer is less than remember_snap_threshold. @@ -582,7 +582,7 @@ box3d_set_corner (SPBox3D *box, const guint id, NR::Point const &new_pos, const bool corner7_move_x = (id & Box3D::X) && (movement & Box3D::X); bool corner7_move_y = (id & Box3D::Y) && (movement & Box3D::Y); // normalizing pt_proj is essential because we want to mingle affine coordinates - pt_proj.normalize(); + pt_proj.normalize(); box->orig_corner0 = Proj::Pt3 (corner0_move_x ? pt_proj[Proj::X] : box->orig_corner0[Proj::X], corner0_move_y ? pt_proj[Proj::Y] : box->orig_corner0[Proj::Y], (id & Box3D::Z) ? box->orig_corner0[Proj::Z] : pt_proj[Proj::Z], @@ -609,7 +609,7 @@ void box3d_set_center (SPBox3D *box, NR::Point const &new_pos, NR::Point const & pt_proj = box3d_snap (box, -1, pt_proj, old_pos_proj); } // normalizing pt_proj is essential because we want to mingle affine coordinates - pt_proj.normalize(); + pt_proj.normalize(); box->orig_corner0 = Proj::Pt3 ((movement & Box3D::X) ? pt_proj[Proj::X] - radx : box->orig_corner0[Proj::X], (movement & Box3D::Y) ? pt_proj[Proj::Y] - rady : box->orig_corner0[Proj::Y], box->orig_corner0[Proj::Z], @@ -627,7 +627,7 @@ void box3d_set_center (SPBox3D *box, NR::Point const &new_pos, NR::Point const & Proj::Pt3 pt_proj (box->persp_ref->getObject()->tmat.preimage (new_pos_snapped, coord, Proj::X)); /* normalizing pt_proj is essential because we want to mingle affine coordinates */ - pt_proj.normalize(); + pt_proj.normalize(); box->orig_corner0 = Proj::Pt3 (box->orig_corner0[Proj::X], box->orig_corner0[Proj::Y], pt_proj[Proj::Z] - radz, @@ -643,7 +643,7 @@ void box3d_set_center (SPBox3D *box, NR::Point const &new_pos, NR::Point const & * Manipulates corner1 through corner4 to contain the indices of the corners * from which the perspective lines in the direction of 'axis' emerge */ -void box3d_corners_for_PLs (const SPBox3D * box, Proj::Axis axis, +void box3d_corners_for_PLs (const SPBox3D * box, Proj::Axis axis, NR::Point &corner1, NR::Point &corner2, NR::Point &corner3, NR::Point &corner4) { g_return_if_fail (box->persp_ref->getObject()); @@ -887,7 +887,7 @@ box3d_set_new_z_orders_case1 (SPBox3D *box, int z_orders[6], Box3D::Axis central //g_print ("central axis Z (case b2)"); box3d_aux_set_z_orders (z_orders, 5, 3, 4, 1, 0, 2); //box3d_aux_set_z_orders (z_orders, 5, 3, 0, 1, 2, 4); - } + } } else { // "regular" case if (!swapped) { @@ -923,7 +923,7 @@ box3d_set_new_z_orders_case1 (SPBox3D *box, int z_orders[6], Box3D::Axis central /* Precisely 2 finite VPs */ static void -box3d_set_new_z_orders_case2 (SPBox3D *box, int z_orders[6], Box3D::Axis central_axis, Box3D::Axis infinite_axis) { +box3d_set_new_z_orders_case2 (SPBox3D *box, int z_orders[6], Box3D::Axis central_axis, Box3D::Axis /*infinite_axis*/) { Persp3D *persp = box->persp_ref->getObject(); NR::Point c3(box3d_get_corner_screen(box, 3)); @@ -944,6 +944,9 @@ box3d_set_new_z_orders_case2 (SPBox3D *box, int z_orders[6], Box3D::Axis central //g_print ("Insides: xy = %d, xz = %d, yx = %d, yz = %d, zx = %d, zy = %d\n", // insidexy, insidexz, insideyx, insideyz, insidezx, insidezy); + (void)insidexz; + (void)insideyx; + (void)insidezx; //g_print ("1 infinite VP; "); switch(central_axis) { diff --git a/src/object-edit.cpp b/src/object-edit.cpp index 9c8db0936..51ec2da10 100644 --- a/src/object-edit.cpp +++ b/src/object-edit.cpp @@ -537,7 +537,7 @@ static NR::Point box3d_knot_get(SPItem *item, guint knot_id) return box3d_get_corner_screen(box, knot_id) * i2d; } -static void box3d_knot_set(SPItem *item, guint knot_id, NR::Point const &new_pos, NR::Point const &origin, guint state) +static void box3d_knot_set(SPItem *item, guint knot_id, NR::Point const &new_pos, NR::Point const &/*origin*/, guint state) { g_assert(item != NULL); SPBox3D *box = SP_BOX3D(item); @@ -653,7 +653,7 @@ static NR::Point box3d_knot7_get(SPItem *item) return box3d_knot_get(item, 7); } -static void box3d_knot_click(SPItem *item, guint state, guint id) +static void box3d_knot_click(SPItem */*item*/, guint /*state*/, guint id) { g_print ("Corner %d was clicked\n", id); } diff --git a/src/persp3d-reference.cpp b/src/persp3d-reference.cpp index cbd855c31..339c8e181 100644 --- a/src/persp3d-reference.cpp +++ b/src/persp3d-reference.cpp @@ -149,7 +149,7 @@ persp3dreference_delete_self(SPObject */*deleted*/, Persp3DReference *persp3dref } static void -persp3dreference_source_modified(SPObject *iSource, guint flags, Persp3DReference *persp3dref) +persp3dreference_source_modified(SPObject */*iSource*/, guint /*flags*/, Persp3DReference *persp3dref) { /** g_print ("persp3dreference_source_modified; FIXME: Can we leave this to the parent URIReference?\n"); diff --git a/src/persp3d.cpp b/src/persp3d.cpp index 818afe053..cb7b31803 100644 --- a/src/persp3d.cpp +++ b/src/persp3d.cpp @@ -471,12 +471,12 @@ persp3d_absorb(Persp3D *persp1, Persp3D *persp2) { persp1->boxes.insert(persp1->boxes.begin(), persp2->boxes.begin(), persp2->boxes.end()); } -static void -persp3d_on_repr_attr_changed ( Inkscape::XML::Node * repr, - const gchar *key, - const gchar *oldval, - const gchar *newval, - bool is_interactive, +static void +persp3d_on_repr_attr_changed ( Inkscape::XML::Node * /*repr*/, + const gchar */*key*/, + const gchar */*oldval*/, + const gchar */*newval*/, + bool /*is_interactive*/, void * data ) { //g_print("persp3d_on_repr_attr_changed!!!! TODO: Do we need to trigger any further updates than the box reprs?"); diff --git a/src/vanishing-point.cpp b/src/vanishing-point.cpp index 0b68ff541..403162d0e 100644 --- a/src/vanishing-point.cpp +++ b/src/vanishing-point.cpp @@ -47,7 +47,7 @@ SPKnotShapeType vp_knot_shapes [] = { }; static void -vp_drag_sel_changed(Inkscape::Selection *selection, gpointer data) +vp_drag_sel_changed(Inkscape::Selection */*selection*/, gpointer data) { VPDrag *drag = (VPDrag *) data; drag->updateDraggers(); @@ -56,7 +56,7 @@ vp_drag_sel_changed(Inkscape::Selection *selection, gpointer data) } static void -vp_drag_sel_modified (Inkscape::Selection *selection, guint flags, gpointer data) +vp_drag_sel_modified (Inkscape::Selection */*selection*/, guint /*flags*/, gpointer data) { VPDrag *drag = (VPDrag *) data; drag->updateLines (); @@ -77,7 +77,7 @@ have_VPs_of_same_perspective (VPDragger *dr1, VPDragger *dr2) } static void -vp_knot_moved_handler (SPKnot *knot, NR::Point const *ppointer, guint state, gpointer data) +vp_knot_moved_handler (SPKnot */*knot*/, NR::Point const *ppointer, guint state, gpointer data) { VPDragger *dragger = (VPDragger *) data; VPDrag *drag = dragger->parent; @@ -163,7 +163,7 @@ vp_knot_moved_handler (SPKnot *knot, NR::Point const *ppointer, guint state, gpo // ... and merge any duplicate perspectives d_new->mergePerspectives(); - + // TODO: Update the new merged dragger //d_new->updateKnotShape (); d_new->updateTip(); @@ -200,7 +200,7 @@ vp_knot_moved_handler (SPKnot *knot, NR::Point const *ppointer, guint state, gpo /* helpful for debugging */ static void -vp_knot_clicked_handler(SPKnot *knot, guint state, gpointer data) +vp_knot_clicked_handler(SPKnot */*knot*/, guint /*state*/, gpointer data) { VPDragger *dragger = (VPDragger *) data; g_print ("\nVPDragger contains the following VPs: "); @@ -211,7 +211,7 @@ vp_knot_clicked_handler(SPKnot *knot, guint state, gpointer data) } void -vp_knot_grabbed_handler (SPKnot *knot, unsigned int state, gpointer data) +vp_knot_grabbed_handler (SPKnot */*knot*/, unsigned int /*state*/, gpointer data) { VPDragger *dragger = (VPDragger *) data; VPDrag *drag = dragger->parent; @@ -220,7 +220,7 @@ vp_knot_grabbed_handler (SPKnot *knot, unsigned int state, gpointer data) } static void -vp_knot_ungrabbed_handler (SPKnot *knot, guint state, gpointer data) +vp_knot_ungrabbed_handler (SPKnot *knot, guint /*state*/, gpointer data) { VPDragger *dragger = (VPDragger *) data; @@ -450,7 +450,7 @@ VPDragger::hasPerspective (const Persp3D *persp) for (std::list::iterator i = vps.begin(); i != vps.end(); ++i) { if (persp3d_perspectives_coincide(persp, (*i).get_perspective())) { return true; - } + } } return false; } @@ -815,8 +815,8 @@ VPDrag::addLine (NR::Point p1, NR::Point p2, guint32 rgba) this->lines = g_slist_append (this->lines, line); } -} // namespace Box3D - +} // namespace Box3D + /* Local Variables: mode:c++