From: joncruz Date: Wed, 16 Jul 2008 03:50:53 +0000 (+0000) Subject: warning cleanup X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=790b412563dca362f0ba25d67bd0daf5d74c6bca;p=inkscape.git warning cleanup --- diff --git a/src/bind/javabind.cpp b/src/bind/javabind.cpp index 7185330e8..e0e246d48 100644 --- a/src/bind/javabind.cpp +++ b/src/bind/javabind.cpp @@ -736,7 +736,7 @@ jstring JNICALL documentGet(JNIEnv *env, jobject /*obj*/, jlong /*ptr*/) * This is provided to scripts can load an XML tree into Inkscape. * If anyone has a smarter way of doing this, please implement. */ -jboolean JNICALL documentSet(JNIEnv *env, jobject /*obj*/, jlong /*ptr*/, jstring /*jstr*/) +jboolean JNICALL documentSet(JNIEnv */*env*/, jobject /*obj*/, jlong /*ptr*/, jstring /*jstr*/) { /* JavaBinderyImpl *bind = (JavaBinderyImpl *)ptr; diff --git a/src/ege-adjustment-action.cpp b/src/ege-adjustment-action.cpp index 757b834f7..942328100 100644 --- a/src/ege-adjustment-action.cpp +++ b/src/ege-adjustment-action.cpp @@ -771,6 +771,7 @@ static gboolean event_cb( EgeAdjustmentAction* act, GdkEvent* evt ) static gchar* slider_format_falue (GtkScale* scale, gdouble value, gchar *label) { + (void)scale; return g_strdup_printf("%s %d", label, (int) round(value)); } diff --git a/src/helper/geom.cpp b/src/helper/geom.cpp index f509485bd..3a8c9078d 100644 --- a/src/helper/geom.cpp +++ b/src/helper/geom.cpp @@ -503,6 +503,7 @@ pathv_to_linear_and_cubic_beziers( Geom::PathVector const &pathv ) output.back().append(*cit); } else if(Geom::CubicBezier const *cubic_bezier = dynamic_cast(&*cit)) { + (void)cubic_bezier; output.back().append(*cit); } else { diff --git a/src/inkview.cpp b/src/inkview.cpp index 3fc5bd6eb..ade2b6d42 100644 --- a/src/inkview.cpp +++ b/src/inkview.cpp @@ -113,14 +113,14 @@ int sp_main_gui (int, char const**) { return 0; } int sp_main_console (int, char const**) { return 0; } static int -sp_svgview_main_delete (GtkWidget *widget, GdkEvent *event, struct SPSlideShow *ss) +sp_svgview_main_delete (GtkWidget */*widget*/, GdkEvent */*event*/, struct SPSlideShow */*ss*/) { gtk_main_quit (); return FALSE; } static int -sp_svgview_main_key_press (GtkWidget *widget, GdkEventKey *event, struct SPSlideShow *ss) +sp_svgview_main_key_press (GtkWidget */*widget*/, GdkEventKey *event, struct SPSlideShow *ss) { switch (event->keyval) { case GDK_Up: @@ -337,7 +337,7 @@ main (int argc, const char **argv) } static int -sp_svgview_ctrlwin_delete (GtkWidget *widget, GdkEvent *event, void *data) +sp_svgview_ctrlwin_delete (GtkWidget */*widget*/, GdkEvent */*event*/, void */*data*/) { ctrlwin = NULL; return FALSE; @@ -387,28 +387,28 @@ sp_svgview_control_show (struct SPSlideShow *ss) } static int -sp_svgview_show_next_cb (GtkWidget *widget, void *data) +sp_svgview_show_next_cb (GtkWidget */*widget*/, void *data) { sp_svgview_show_next(static_cast(data)); return FALSE; } static int -sp_svgview_show_prev_cb (GtkWidget *widget, void *data) +sp_svgview_show_prev_cb (GtkWidget */*widget*/, void *data) { sp_svgview_show_prev(static_cast(data)); return FALSE; } static int -sp_svgview_goto_first_cb (GtkWidget *widget, void *data) +sp_svgview_goto_first_cb (GtkWidget */*widget*/, void *data) { sp_svgview_goto_first(static_cast(data)); return FALSE; } static int -sp_svgview_goto_last_cb (GtkWidget *widget, void *data) +sp_svgview_goto_last_cb (GtkWidget */*widget*/, void *data) { sp_svgview_goto_last(static_cast(data)); return FALSE; diff --git a/src/libnr/nr-gradient.cpp b/src/libnr/nr-gradient.cpp index 57ba651f4..288722a16 100644 --- a/src/libnr/nr-gradient.cpp +++ b/src/libnr/nr-gradient.cpp @@ -105,8 +105,8 @@ static void compose(NRPixBlock *pb, unsigned char *dest, template <> struct Compose { static const unsigned bpp=4; -static void compose(NRPixBlock *pb, unsigned char *dest, - NRPixBlock *spb, unsigned char const *src) +static void compose(NRPixBlock */*pb*/, unsigned char *dest, + NRPixBlock */*spb*/, unsigned char const *src) { std::memcpy(dest, src, 4); } @@ -115,8 +115,8 @@ static void compose(NRPixBlock *pb, unsigned char *dest, template <> struct Compose { static const unsigned bpp=4; -static void compose(NRPixBlock *pb, unsigned char *dest, - NRPixBlock *spb, unsigned char const *src) +static void compose(NRPixBlock */*pb*/, unsigned char *dest, + NRPixBlock */*spb*/, unsigned char const *src) { dest[0] = NR_PREMUL_111(src[0], src[3]); dest[1] = NR_PREMUL_111(src[1], src[3]); @@ -128,8 +128,8 @@ static void compose(NRPixBlock *pb, unsigned char *dest, template <> struct Compose { static const unsigned bpp=3; -static void compose(NRPixBlock *pb, unsigned char *dest, - NRPixBlock *spb, unsigned char const *src) +static void compose(NRPixBlock */*pb*/, unsigned char *dest, + NRPixBlock */*spb*/, unsigned char const *src) { dest[0] = NR_COMPOSEN11_1111(src[0], src[3], 255); dest[1] = NR_COMPOSEN11_1111(src[1], src[3], 255); @@ -140,8 +140,8 @@ static void compose(NRPixBlock *pb, unsigned char *dest, template <> struct Compose { static const unsigned bpp=1; -static void compose(NRPixBlock *pb, unsigned char *dest, - NRPixBlock *spb, unsigned char const *src) +static void compose(NRPixBlock */*pb*/, unsigned char *dest, + NRPixBlock */*spb*/, unsigned char const *src) { dest[0] = src[3]; } @@ -150,8 +150,8 @@ static void compose(NRPixBlock *pb, unsigned char *dest, template <> struct Compose { static const unsigned bpp=4; -static void compose(NRPixBlock *pb, unsigned char *dest, - NRPixBlock *spb, unsigned char const *src) +static void compose(NRPixBlock */*pb*/, unsigned char *dest, + NRPixBlock */*spb*/, unsigned char const *src) { unsigned int ca; ca = NR_COMPOSEA_112(src[3], dest[3]); @@ -165,8 +165,8 @@ static void compose(NRPixBlock *pb, unsigned char *dest, template <> struct Compose { static const unsigned bpp=4; -static void compose(NRPixBlock *pb, unsigned char *dest, - NRPixBlock *spb, unsigned char const *src) +static void compose(NRPixBlock */*pb*/, unsigned char *dest, + NRPixBlock */*spb*/, unsigned char const *src) { dest[0] = NR_COMPOSENPP_1111(src[0], src[3], dest[0]); dest[1] = NR_COMPOSENPP_1111(src[1], src[3], dest[1]); @@ -178,8 +178,8 @@ static void compose(NRPixBlock *pb, unsigned char *dest, template <> struct Compose { static const unsigned bpp=3; -static void compose(NRPixBlock *pb, unsigned char *dest, - NRPixBlock *spb, unsigned char const *src) +static void compose(NRPixBlock */*pb*/, unsigned char *dest, + NRPixBlock */*spb*/, unsigned char const *src) { dest[0] = NR_COMPOSEN11_1111(src[0], src[3], dest[0]); dest[1] = NR_COMPOSEN11_1111(src[1], src[3], dest[1]); @@ -233,11 +233,9 @@ render_spread(NRGradientRenderer *gr, NRPixBlock *pb) template static void -render(NRRenderer *r, NRPixBlock *pb, NRPixBlock *m) +render(NRRenderer *r, NRPixBlock *pb, NRPixBlock */*m*/) { - NRGradientRenderer *gr; - - gr = static_cast(r); + NRGradientRenderer *gr = static_cast(r); switch (gr->spread) { case NR_GRADIENT_SPREAD_REPEAT: diff --git a/src/livarot/PathStroke.cpp b/src/livarot/PathStroke.cpp index c182b93aa..f4ece6892 100644 --- a/src/livarot/PathStroke.cpp +++ b/src/livarot/PathStroke.cpp @@ -91,7 +91,7 @@ void Path::Stroke(Shape *dest, bool doClose, double width, JoinType join, } void Path::DoStroke(int off, int N, Shape *dest, bool doClose, double width, JoinType join, - ButtType butt, double miter, bool justAdd) + ButtType butt, double miter, bool /*justAdd*/) { if (N <= 1) { return; @@ -286,7 +286,7 @@ void Path::DoButt(Shape *dest, double width, ButtType butt, NR::Point pos, NR::P void Path::DoJoin (Shape *dest, double width, JoinType join, NR::Point pos, NR::Point prev, - NR::Point next, double miter, double prevL, double nextL, + NR::Point next, double miter, double /*prevL*/, double /*nextL*/, int *stNo, int *enNo) { NR::Point pnor = prev.ccw(); @@ -410,7 +410,7 @@ void Path::DoJoin (Shape *dest, double width, JoinType join, NR::Point pos, NR:: void Path::DoLeftJoin (Shape * dest, double width, JoinType join, NR::Point pos, - NR::Point prev, NR::Point next, double miter, double prevL, double nextL, + NR::Point prev, NR::Point next, double miter, double /*prevL*/, double /*nextL*/, int &leftStNo, int &leftEnNo,int pathID,int pieceID,double tID) { NR::Point pnor=prev.ccw(); @@ -553,8 +553,8 @@ Path::DoLeftJoin (Shape * dest, double width, JoinType join, NR::Point pos, } void Path::DoRightJoin (Shape * dest, double width, JoinType join, NR::Point pos, - NR::Point prev, NR::Point next, double miter, double prevL, - double nextL, int &rightStNo, int &rightEnNo,int pathID,int pieceID,double tID) + NR::Point prev, NR::Point next, double miter, double /*prevL*/, + double /*nextL*/, int &rightStNo, int &rightEnNo,int pathID,int pieceID,double tID) { const NR::Point pnor=prev.ccw(); const NR::Point nnor=next.ccw(); diff --git a/src/livarot/ShapeMisc.cpp b/src/livarot/ShapeMisc.cpp index 7000bb115..cacf4c997 100644 --- a/src/livarot/ShapeMisc.cpp +++ b/src/livarot/ShapeMisc.cpp @@ -982,7 +982,7 @@ Shape::AddContour (Path * dest, int nbP, Path * *orig, int startBord, int curBor } int -Shape::ReFormeLineTo (int bord, int curBord, Path * dest, Path * orig) +Shape::ReFormeLineTo (int bord, int /*curBord*/, Path * dest, Path * /*orig*/) { int nPiece = ebData[bord].pieceID; int nPath = ebData[bord].pathID; @@ -1016,7 +1016,7 @@ Shape::ReFormeLineTo (int bord, int curBord, Path * dest, Path * orig) } int -Shape::ReFormeArcTo (int bord, int curBord, Path * dest, Path * from) +Shape::ReFormeArcTo (int bord, int /*curBord*/, Path * dest, Path * from) { int nPiece = ebData[bord].pieceID; int nPath = ebData[bord].pathID; @@ -1094,7 +1094,7 @@ Shape::ReFormeArcTo (int bord, int curBord, Path * dest, Path * from) } int -Shape::ReFormeCubicTo (int bord, int curBord, Path * dest, Path * from) +Shape::ReFormeCubicTo (int bord, int /*curBord*/, Path * dest, Path * from) { int nPiece = ebData[bord].pieceID; int nPath = ebData[bord].pathID; @@ -1140,7 +1140,7 @@ Shape::ReFormeCubicTo (int bord, int curBord, Path * dest, Path * from) } int -Shape::ReFormeBezierTo (int bord, int curBord, Path * dest, Path * from) +Shape::ReFormeBezierTo (int bord, int /*curBord*/, Path * dest, Path * from) { int nPiece = ebData[bord].pieceID; int nPath = ebData[bord].pathID; diff --git a/src/livarot/ShapeRaster.cpp b/src/livarot/ShapeRaster.cpp index 4e762396e..528fe395d 100644 --- a/src/livarot/ShapeRaster.cpp +++ b/src/livarot/ShapeRaster.cpp @@ -273,7 +273,7 @@ void Shape::Scan(float &pos, int &curP, float to, float step) -void Shape::QuickScan(float &pos,int &curP, float to, bool doSort, float step) +void Shape::QuickScan(float &pos,int &curP, float to, bool /*doSort*/, float step) { if ( numberOfEdges() <= 1 ) { return; @@ -706,7 +706,7 @@ void Shape::DirectScan(float &pos, int &curP, float to, float step) -void Shape::DirectQuickScan(float &pos, int &curP, float to, bool doSort, float step) +void Shape::DirectQuickScan(float &pos, int &curP, float to, bool /*doSort*/, float step) { if ( numberOfEdges() <= 1 ) { return; diff --git a/src/livarot/ShapeSweep.cpp b/src/livarot/ShapeSweep.cpp index 18f8e3a69..2d7bfe252 100644 --- a/src/livarot/ShapeSweep.cpp +++ b/src/livarot/ShapeSweep.cpp @@ -2352,7 +2352,7 @@ Shape::AssembleAretes (FillRule directed) } } void -Shape::GetWindings (Shape * a, Shape * b, BooleanOp mod, bool brutal) +Shape::GetWindings (Shape * /*a*/, Shape * /*b*/, BooleanOp /*mod*/, bool brutal) { // preparation du parcours for (int i = 0; i < numberOfEdges(); i++) @@ -2510,7 +2510,7 @@ Shape::GetWindings (Shape * a, Shape * b, BooleanOp mod, bool brutal) bool Shape::TesteIntersection (Shape * ils, Shape * irs, int ilb, int irb, NR::Point &atx, double &atL, double &atR, - bool onlyDiff) + bool /*onlyDiff*/) { int lSt = ils->getEdge(ilb).st, lEn = ils->getEdge(ilb).en; int rSt = irs->getEdge(irb).st, rEn = irs->getEdge(irb).en; @@ -2720,8 +2720,8 @@ Shape::TesteAdjacency (Shape * a, int no, const NR::Point atx, int nPt, } void -Shape::CheckAdjacencies (int lastPointNo, int lastChgtPt, Shape * shapeHead, - int edgeHead) +Shape::CheckAdjacencies (int lastPointNo, int lastChgtPt, Shape * /*shapeHead*/, + int /*edgeHead*/) { for (unsigned int cCh = 0; cCh < chgts.size(); cCh++) { @@ -3111,7 +3111,7 @@ Shape::CheckEdges (int lastPointNo, int lastChgtPt, Shape * a, Shape * b, } void -Shape::Avance (int lastPointNo, int lastChgtPt, Shape * lS, int lB, Shape * a, +Shape::Avance (int lastPointNo, int lastChgtPt, Shape * lS, int lB, Shape * /*a*/, Shape * b, BooleanOp mod) { double dd = HalfRound (1); diff --git a/src/livarot/path-description.cpp b/src/livarot/path-description.cpp index 96cd81ee6..8058e0452 100644 --- a/src/livarot/path-description.cpp +++ b/src/livarot/path-description.cpp @@ -6,7 +6,7 @@ PathDescr *PathDescrMoveTo::clone() const return new PathDescrMoveTo(*this); } -void PathDescrMoveTo::dumpSVG(Inkscape::SVGOStringStream& s, NR::Point const &last) const +void PathDescrMoveTo::dumpSVG(Inkscape::SVGOStringStream& s, NR::Point const &/*last*/) const { s << "M " << p[NR::X] << " " << p[NR::Y] << " "; } @@ -22,7 +22,7 @@ void PathDescrMoveTo::dump(std::ostream &s) const s << " m " << p[NR::X] << " " << p[NR::Y]; } -void PathDescrLineTo::dumpSVG(Inkscape::SVGOStringStream& s, NR::Point const &last) const +void PathDescrLineTo::dumpSVG(Inkscape::SVGOStringStream& s, NR::Point const &/*last*/) const { s << "L " << p[NR::X] << " " << p[NR::Y] << " "; } @@ -110,7 +110,7 @@ void PathDescrCubicTo::transform(NR::Matrix const& t) p = p * t; } -void PathDescrArcTo::dumpSVG(Inkscape::SVGOStringStream& s, NR::Point const &last) const +void PathDescrArcTo::dumpSVG(Inkscape::SVGOStringStream& s, NR::Point const &/*last*/) const { s << "A " << rx << " " @@ -148,7 +148,7 @@ PathDescr *PathDescrForced::clone() const return new PathDescrForced(*this); } -void PathDescrClose::dumpSVG(Inkscape::SVGOStringStream& s, NR::Point const &last) const +void PathDescrClose::dumpSVG(Inkscape::SVGOStringStream& s, NR::Point const &/*last*/) const { s << "z "; } diff --git a/src/livarot/sweep-tree.cpp b/src/livarot/sweep-tree.cpp index 0e4567663..c6c295e33 100644 --- a/src/livarot/sweep-tree.cpp +++ b/src/livarot/sweep-tree.cpp @@ -314,7 +314,7 @@ SweepTree::Insert(SweepTreeList &list, SweepEventQueue &queue, int SweepTree::InsertAt(SweepTreeList &list, SweepEventQueue &queue, - Shape *iDst, SweepTree *insNode, int fromPt, + Shape */*iDst*/, SweepTree *insNode, int fromPt, bool rebalance, bool sweepSens) { if (list.racine == NULL) @@ -489,8 +489,9 @@ SweepTree::Relocate(SweepTree * to) evt[RIGHT]->sweep[LEFT] = to; } +// TODO check if ignoring these parameters is bad void -SweepTree::SwapWithRight(SweepTreeList &list, SweepEventQueue &queue) +SweepTree::SwapWithRight(SweepTreeList &/*list*/, SweepEventQueue &/*queue*/) { SweepTree *tL = this; SweepTree *tR = static_cast(elem[RIGHT]); @@ -522,7 +523,7 @@ SweepTree::SwapWithRight(SweepTreeList &list, SweepEventQueue &queue) } void -SweepTree::Avance(Shape *dstPts, int curPoint, Shape *a, Shape *b) +SweepTree::Avance(Shape */*dstPts*/, int /*curPoint*/, Shape */*a*/, Shape */*b*/) { return; /* if ( curPoint != startPoint ) { diff --git a/src/live_effects/lpe-ruler.cpp b/src/live_effects/lpe-ruler.cpp index 85db5c1c7..89da4efe3 100644 --- a/src/live_effects/lpe-ruler.cpp +++ b/src/live_effects/lpe-ruler.cpp @@ -54,7 +54,7 @@ LPERuler::doEffect_pwd2 (Geom::Piecewise > const & pwd2_i g_print ("Distance: %8.2f\n", length); Point C, D; - for (int i = 0; i < length; i+=mark_distance) { + for (int i = 0; i < length; i += static_cast(mark_distance)) { C = A + dir * i; D = C + n; Piecewise > seg(D2(Linear(C[X], D[X]), Linear(C[Y], D[Y]))); diff --git a/src/live_effects/parameter/pointparam-knotholder.cpp b/src/live_effects/parameter/pointparam-knotholder.cpp index 06e527ffd..3ab07a951 100644 --- a/src/live_effects/parameter/pointparam-knotholder.cpp +++ b/src/live_effects/parameter/pointparam-knotholder.cpp @@ -79,7 +79,7 @@ void PointParamKnotHolder::add_knot ( Geom::Point & p, // TODO: check if knot_click being ignored is bad: - PointParamKnotHolderClickedFunc knot_click, + PointParamKnotHolderClickedFunc /*knot_click*/, SPKnotShapeType shape, SPKnotModeType mode, guint32 color, diff --git a/src/svg/gnome-canvas-bpath-util.cpp b/src/svg/gnome-canvas-bpath-util.cpp index 5c94f1e1b..bd55bfb10 100644 --- a/src/svg/gnome-canvas-bpath-util.cpp +++ b/src/svg/gnome-canvas-bpath-util.cpp @@ -35,6 +35,7 @@ static bool isApproximatelyClosed(GnomeCanvasBpathDef *bpd) { int const initial = bpd->moveto_idx; int const current = bpd->n_bpath - 1; NR::Point distToInit(distTo(bpd, current, initial)); + // TODO check the double to int conversion in the abs() call: return distToInit[NR::X] <= abs(bpd->bpath[current].c(3)[NR::X])*precision && distToInit[NR::Y] <= abs(bpd->bpath[current].c(3)[NR::Y])*precision; diff --git a/src/widgets/icon.cpp b/src/widgets/icon.cpp index f62c584c3..eb36d4c69 100644 --- a/src/widgets/icon.cpp +++ b/src/widgets/icon.cpp @@ -1036,7 +1036,7 @@ gboolean icon_prerender_task(gpointer /*data*/) { } } -void imageMapCB(GtkWidget* widget, gpointer user_data) { +void imageMapCB(GtkWidget* widget, gpointer /*user_data*/) { gchar* id = 0; GtkIconSize size = GTK_ICON_SIZE_INVALID; gtk_image_get_stock(GTK_IMAGE(widget), &id, &size);