diff options
| author | Jon A. Cruz <jon@joncruz.org> | 2011-06-22 10:07:58 +0000 |
|---|---|---|
| committer | Jon A. Cruz <jon@joncruz.org> | 2011-06-22 10:07:58 +0000 |
| commit | 8640e3a8755e772cc7982a9d6f8a47c6ee0dae00 (patch) | |
| tree | 2f9cdb1b9e13dc49a810fdfca4eb575610a948cb /src | |
| parent | Revision 10333 introduced dependency on gtk version 2.24 which is currently n... (diff) | |
| download | inkscape-8640e3a8755e772cc7982a9d6f8a47c6ee0dae00.tar.gz inkscape-8640e3a8755e772cc7982a9d6f8a47c6ee0dae00.zip | |
Warning cleanup.
(bzr r10339)
Diffstat (limited to 'src')
24 files changed, 73 insertions, 73 deletions
diff --git a/src/dialogs/text-edit.cpp b/src/dialogs/text-edit.cpp index 76cbdef57..76ad3bcc3 100644 --- a/src/dialogs/text-edit.cpp +++ b/src/dialogs/text-edit.cpp @@ -925,7 +925,7 @@ sp_text_edit_dialog_default_set_insensitive () } static void -sp_text_edit_dialog_font_changed ( SPFontSelector *fsel, +sp_text_edit_dialog_font_changed ( SPFontSelector * /*fsel*/, font_instance *font, GtkWidget *dlg ) { diff --git a/src/display/nr-arena-glyphs.cpp b/src/display/nr-arena-glyphs.cpp index facb5e9c6..dbac07596 100644 --- a/src/display/nr-arena-glyphs.cpp +++ b/src/display/nr-arena-glyphs.cpp @@ -149,8 +149,7 @@ nr_arena_glyphs_update(NRArenaItem *item, NRRectL */*area*/, NRGC *gc, guint /*s return NR_ARENA_ITEM_STATE_ALL; } -static guint -nr_arena_glyphs_clip(cairo_t *ct, NRArenaItem *item, NRRectL */*area*/) +static guint nr_arena_glyphs_clip(cairo_t * /*ct*/, NRArenaItem *item, NRRectL * /*area*/) { NRArenaGlyphs *glyphs; @@ -158,7 +157,7 @@ nr_arena_glyphs_clip(cairo_t *ct, NRArenaItem *item, NRRectL */*area*/) if (!glyphs->font) return item->state; - /* TODO : render to greyscale pixblock provided for clipping */ + // TODO : render to greyscale pixblock provided for clipping return item->state; } @@ -283,15 +282,16 @@ nr_arena_glyphs_group_update(NRArenaItem *item, NRRectL *area, NRGC *gc, guint s } -static unsigned int -nr_arena_glyphs_group_render(cairo_t *ct, NRArenaItem *item, NRRectL *area, NRPixBlock *pb, unsigned int /*flags*/) +static unsigned int nr_arena_glyphs_group_render(cairo_t *ct, NRArenaItem *item, NRRectL *area, NRPixBlock * /*pb*/, unsigned int /*flags*/) { - NRArenaItem *child; + NRArenaItem *child = 0; NRArenaGroup *group = NR_ARENA_GROUP(item); NRArenaGlyphsGroup *ggroup = NR_ARENA_GLYPHS_GROUP(item); - if (!ct) return item->state; + if (!ct) { + return item->state; + } if (item->arena->rendermode == Inkscape::RENDERMODE_OUTLINE) { @@ -352,14 +352,13 @@ nr_arena_glyphs_group_render(cairo_t *ct, NRArenaItem *item, NRRectL *area, NRPi return item->state; } -static unsigned int -nr_arena_glyphs_group_clip(cairo_t *ct, NRArenaItem *item, NRRectL *area) +static unsigned int nr_arena_glyphs_group_clip(cairo_t * /*ct*/, NRArenaItem *item, NRRectL * /*area*/) { //NRArenaGroup *group = NR_ARENA_GROUP(item); guint ret = item->state; - /* Render children fill mask */ + // Render children fill mask /* for (NRArenaItem *child = group->children; child != NULL; child = child->next) { ret = nr_arena_glyphs_fill_mask(NR_ARENA_GLYPHS(child), area, pb); diff --git a/src/display/nr-arena-image.cpp b/src/display/nr-arena-image.cpp index cb1bc5849..36d733eb8 100644 --- a/src/display/nr-arena-image.cpp +++ b/src/display/nr-arena-image.cpp @@ -134,18 +134,20 @@ nr_arena_image_update( NRArenaItem *item, NRRectL */*area*/, NRGC *gc, unsigned return NR_ARENA_ITEM_STATE_ALL; } -static unsigned int -nr_arena_image_render( cairo_t *ct, NRArenaItem *item, NRRectL *area, NRPixBlock *pb, unsigned int /*flags*/ ) +static unsigned int nr_arena_image_render( cairo_t *ct, NRArenaItem *item, NRRectL * /*area*/, NRPixBlock * /*pb*/, unsigned int /*flags*/ ) { - if (!ct) + if (!ct) { return item->state; + } bool outline = (item->arena->rendermode == Inkscape::RENDERMODE_OUTLINE); NRArenaImage *image = NR_ARENA_IMAGE (item); if (!outline) { - if (!image->pixbuf) return item->state; + if (!image->pixbuf) { + return item->state; + } // FIXME: at the moment gdk_cairo_set_source_pixbuf creates an ARGB copy // of the pixbuf. Fix this in Cairo and/or GDK. diff --git a/src/display/nr-arena-item.cpp b/src/display/nr-arena-item.cpp index 8787c1033..526882921 100644 --- a/src/display/nr-arena-item.cpp +++ b/src/display/nr-arena-item.cpp @@ -767,8 +767,7 @@ nr_arena_item_set_item_bbox (NRArenaItem *item, Geom::OptRect &bbox) } /** Returns a background image for use with filter effects. */ -NRPixBlock * -nr_arena_item_get_background (NRArenaItem const *item) +NRPixBlock *nr_arena_item_get_background(NRArenaItem const * /*item*/) { return NULL; } diff --git a/src/display/nr-arena-shape.cpp b/src/display/nr-arena-shape.cpp index f278413b2..eb7a30e58 100644 --- a/src/display/nr-arena-shape.cpp +++ b/src/display/nr-arena-shape.cpp @@ -394,20 +394,24 @@ nr_arena_shape_render(cairo_t *ct, NRArenaItem *item, NRRectL *area, NRPixBlock } -static guint -nr_arena_shape_clip(cairo_t *ct, NRArenaItem *item, NRRectL *area) +static guint nr_arena_shape_clip(cairo_t *ct, NRArenaItem *item, NRRectL * /*area*/) { + guint result = 0; + // NOTE: for now this is incorrect, because it doesn't honor clip-rule, // and will be incorrect for nested clipping paths. NRArenaShape *shape = NR_ARENA_SHAPE(item); - if (!shape->curve) return item->state; - - cairo_save(ct); - ink_cairo_transform(ct, shape->ctm); - feed_pathvector_to_cairo(ct, shape->curve->get_pathvector()); - cairo_restore(ct); + if (!shape->curve) { + result = item->state; + } else { + cairo_save(ct); + ink_cairo_transform(ct, shape->ctm); + feed_pathvector_to_cairo(ct, shape->curve->get_pathvector()); + cairo_restore(ct); - return item->state; + result = item->state; + } + return result; } static NRArenaItem * @@ -508,7 +512,7 @@ nr_arena_shape_pick(NRArenaItem *item, Geom::Point p, double delta, unsigned int * curve and adds it to the shape. Finally, it requests an update of the * arena for the shape. */ -void nr_arena_shape_set_path(NRArenaShape *shape, SPCurve *curve,bool justTrans) +void nr_arena_shape_set_path(NRArenaShape *shape, SPCurve *curve, bool /*justTrans*/) { g_return_if_fail(shape != NULL); g_return_if_fail(NR_IS_ARENA_SHAPE(shape)); diff --git a/src/display/nr-filter-diffuselighting.cpp b/src/display/nr-filter-diffuselighting.cpp index 0a46a5c86..eaed2a8bd 100644 --- a/src/display/nr-filter-diffuselighting.cpp +++ b/src/display/nr-filter-diffuselighting.cpp @@ -160,7 +160,7 @@ void FilterDiffuseLighting::render_cairo(FilterSlot &slot) cairo_surface_destroy(out); } -void FilterDiffuseLighting::area_enlarge(NRRectL &area, Geom::Affine const &trans) +void FilterDiffuseLighting::area_enlarge(NRRectL &area, Geom::Affine const & /*trans*/) { // TODO: support kernelUnitLength diff --git a/src/display/nr-filter-primitive.h b/src/display/nr-filter-primitive.h index dd7363d76..ebecb91ec 100644 --- a/src/display/nr-filter-primitive.h +++ b/src/display/nr-filter-primitive.h @@ -46,7 +46,7 @@ public: virtual ~FilterPrimitive(); virtual void render_cairo(FilterSlot &slot); - virtual int render(FilterSlot &slot, FilterUnits const &units) { return 0; } + virtual int render(FilterSlot & /*slot*/, FilterUnits const & /*units*/) { return 0; } virtual void area_enlarge(NRRectL &area, Geom::Affine const &m); /** diff --git a/src/display/nr-filter-specularlighting.cpp b/src/display/nr-filter-specularlighting.cpp index eddab36a1..2e5f69d65 100644 --- a/src/display/nr-filter-specularlighting.cpp +++ b/src/display/nr-filter-specularlighting.cpp @@ -304,7 +304,7 @@ int FilterSpecularLighting::render(FilterSlot &slot, FilterUnits const &units) { return 0; }*/ -void FilterSpecularLighting::area_enlarge(NRRectL &area, Geom::Affine const &trans) +void FilterSpecularLighting::area_enlarge(NRRectL &area, Geom::Affine const & /*trans*/) { // TODO: support kernelUnitLength diff --git a/src/display/nr-filter-turbulence.cpp b/src/display/nr-filter-turbulence.cpp index 6aa435715..f3b03c024 100644 --- a/src/display/nr-filter-turbulence.cpp +++ b/src/display/nr-filter-turbulence.cpp @@ -342,7 +342,8 @@ void FilterTurbulence::set_type(FilterTurbulenceType t){ gen->dirty(); } -void FilterTurbulence::set_updated(bool u){ +void FilterTurbulence::set_updated(bool /*u*/) +{ } struct Turbulence { diff --git a/src/display/sp-canvas-util.cpp b/src/display/sp-canvas-util.cpp index 186609e49..d1ea842fd 100644 --- a/src/display/sp-canvas-util.cpp +++ b/src/display/sp-canvas-util.cpp @@ -38,8 +38,7 @@ sp_canvas_item_reset_bounds (SPCanvasItem *item) item->y2 = 0.0; } -void -sp_canvas_prepare_buffer (SPCanvasBuf *buf) +void sp_canvas_prepare_buffer(SPCanvasBuf * /*buf*/) { /*if (buf->is_empty) { int y; diff --git a/src/display/sp-canvas.cpp b/src/display/sp-canvas.cpp index c84452c07..472c9ada5 100644 --- a/src/display/sp-canvas.cpp +++ b/src/display/sp-canvas.cpp @@ -1620,8 +1620,7 @@ sp_canvas_motion (GtkWidget *widget, GdkEventMotion *event) return status; } -static void -sp_canvas_paint_single_buffer (SPCanvas *canvas, int x0, int y0, int x1, int y1, int draw_x1, int draw_y1, int draw_x2, int draw_y2, int sw) +static void sp_canvas_paint_single_buffer(SPCanvas *canvas, int x0, int y0, int x1, int y1, int draw_x1, int draw_y1, int draw_x2, int draw_y2, int /*sw*/) { GtkWidget *widget = GTK_WIDGET (canvas); diff --git a/src/extension/internal/cairo-png-out.cpp b/src/extension/internal/cairo-png-out.cpp index eb26fc581..b30e22e7e 100644 --- a/src/extension/internal/cairo-png-out.cpp +++ b/src/extension/internal/cairo-png-out.cpp @@ -43,10 +43,9 @@ namespace Inkscape { namespace Extension { namespace Internal { -bool -CairoRendererOutput::check (Inkscape::Extension::Extension * module) +bool CairoRendererOutput::check(Inkscape::Extension::Extension * /*module*/) { - return TRUE; + return true; } static bool @@ -93,13 +92,11 @@ png_render_document_to_file(SPDocument *doc, gchar const *filename) \param doc Document to be saved \param uri Filename to save to (probably will end in .png) */ -void -CairoRendererOutput::save(Inkscape::Extension::Output *mod, SPDocument *doc, gchar const *filename) +void CairoRendererOutput::save(Inkscape::Extension::Output * /*mod*/, SPDocument *doc, gchar const *filename) { - if (!png_render_document_to_file(doc, filename)) + if (!png_render_document_to_file(doc, filename)) { throw Inkscape::Extension::Output::save_failed(); - - return; + } } /** diff --git a/src/extension/internal/cairo-render-context.cpp b/src/extension/internal/cairo-render-context.cpp index b9c2a4488..1c1dac028 100644 --- a/src/extension/internal/cairo-render-context.cpp +++ b/src/extension/internal/cairo-render-context.cpp @@ -1419,14 +1419,14 @@ CairoRenderContext::renderPathVector(Geom::PathVector const & pathv, SPStyle con return true; } -bool -CairoRenderContext::renderImage(guchar *px, unsigned int w, unsigned int h, unsigned int rs, - Geom::Affine const *image_transform, SPStyle const *style) +bool CairoRenderContext::renderImage(guchar *px, unsigned int w, unsigned int h, unsigned int rs, + Geom::Affine const *image_transform, SPStyle const * /*style*/) { g_assert( _is_valid ); - if (_render_mode == RENDER_MODE_CLIP) + if (_render_mode == RENDER_MODE_CLIP) { return true; + } guchar* px_rgba = NULL; guint64 size = 4L * (guint64)w * (guint64)h; @@ -1514,8 +1514,8 @@ CairoRenderContext::renderImage(guchar *px, unsigned int w, unsigned int h, unsi #define GLYPH_ARRAY_SIZE 64 -unsigned int -CairoRenderContext::_showGlyphs(cairo_t *cr, PangoFont *font, std::vector<CairoGlyphInfo> const &glyphtext, bool path) +// TODO investigate why the font is being ignored: +unsigned int CairoRenderContext::_showGlyphs(cairo_t *cr, PangoFont * /*font*/, std::vector<CairoGlyphInfo> const &glyphtext, bool path) { cairo_glyph_t glyph_array[GLYPH_ARRAY_SIZE]; cairo_glyph_t *glyphs = glyph_array; @@ -1551,8 +1551,9 @@ CairoRenderContext::_showGlyphs(cairo_t *cr, PangoFont *font, std::vector<CairoG cairo_show_glyphs(cr, glyphs, num_glyphs - num_invalid_glyphs); } - if (num_glyphs > GLYPH_ARRAY_SIZE) + if (num_glyphs > GLYPH_ARRAY_SIZE) { g_free(glyphs); + } return num_glyphs - num_invalid_glyphs; } diff --git a/src/extension/internal/cairo-renderer-pdf-out.cpp b/src/extension/internal/cairo-renderer-pdf-out.cpp index 6527a646b..cdd9647e2 100644 --- a/src/extension/internal/cairo-renderer-pdf-out.cpp +++ b/src/extension/internal/cairo-renderer-pdf-out.cpp @@ -43,13 +43,15 @@ namespace Inkscape { namespace Extension { namespace Internal { -bool -CairoRendererPdfOutput::check (Inkscape::Extension::Extension * module) +bool CairoRendererPdfOutput::check(Inkscape::Extension::Extension * /*module*/) { - if (NULL == Inkscape::Extension::db.get("org.inkscape.output.pdf.cairorenderer")) - return FALSE; + bool result = true; - return TRUE; + if (NULL == Inkscape::Extension::db.get("org.inkscape.output.pdf.cairorenderer")) { + result = false; + } + + return result; } static bool diff --git a/src/extension/internal/wpg-input.cpp b/src/extension/internal/wpg-input.cpp index 3cd5044f7..0f2857570 100644 --- a/src/extension/internal/wpg-input.cpp +++ b/src/extension/internal/wpg-input.cpp @@ -68,8 +68,8 @@ namespace Extension { namespace Internal { -SPDocument * -WpgInput::open(Inkscape::Extension::Input * mod, const gchar * uri) { +SPDocument *WpgInput::open(Inkscape::Extension::Input * /*mod*/, const gchar * uri) +{ #if WITH_LIBWPG01 WPXInputStream* input = new libwpg::WPGFileStream(uri); #elif WITH_LIBWPG02 diff --git a/src/knot-holder-entity.cpp b/src/knot-holder-entity.cpp index 7da3d0c0e..128ca281e 100644 --- a/src/knot-holder-entity.cpp +++ b/src/knot-holder-entity.cpp @@ -107,7 +107,6 @@ KnotHolderEntity::snap_knot_position_constrained(Geom::Point const &p, Inkscape: SnapManager &m = desktop->namedview->snap_manager; m.setup(desktop, true, item); - Inkscape::Preferences *prefs = Inkscape::Preferences::get(); // constrainedSnap() will first project the point p onto the constraint line and then try to snap along that line. // This way the constraint is already enforced, no need to worry about that later on Inkscape::Snapper::SnapConstraint transformed_constraint = Inkscape::Snapper::SnapConstraint(constraint.getPoint() * i2d, (constraint.getPoint() + constraint.getDirection()) * i2d - constraint.getPoint() * i2d); diff --git a/src/libnr/nr-rect.cpp b/src/libnr/nr-rect.cpp index 58e16e963..8e3672e03 100644 --- a/src/libnr/nr-rect.cpp +++ b/src/libnr/nr-rect.cpp @@ -218,8 +218,8 @@ nr_rect_d_union_xy (NRRect *d, NR::Coord x, NR::Coord y) return d; } -NRRect * -nr_rect_d_matrix_transform(NRRect *d, NRRect const *const s, NR::Matrix const &m) +// TODO investigate for removal: +NRRect *nr_rect_d_matrix_transform(NRRect *d, NRRect const *const /*s*/, NR::Matrix const & /*m*/) { // defunct /* diff --git a/src/live_effects/parameter/powerstrokepointarray.cpp b/src/live_effects/parameter/powerstrokepointarray.cpp index 9d43e8447..66337fd8f 100644 --- a/src/live_effects/parameter/powerstrokepointarray.cpp +++ b/src/live_effects/parameter/powerstrokepointarray.cpp @@ -70,8 +70,7 @@ PowerStrokePointArrayParam::param_newWidget(Gtk::Tooltips * /*tooltips*/) } -void -PowerStrokePointArrayParam::param_transform_multiply(Geom::Affine const& postmul, bool /*set*/) +void PowerStrokePointArrayParam::param_transform_multiply(Geom::Affine const& /*postmul*/, bool /*set*/) { // param_set_and_write_new_value( (*this) * postmul ); } diff --git a/src/measure-context.cpp b/src/measure-context.cpp index 741dd5edd..bc766872b 100644 --- a/src/measure-context.cpp +++ b/src/measure-context.cpp @@ -135,7 +135,8 @@ bool GeomPointSortPredicate(const Geom::Point& p1, const Geom::Point& p2) return p1[Geom::Y] < p2[Geom::Y]; } -void calculate_intersections(SPDesktop *desktop, SPItem* item, Geom::PathVector *lineseg, SPCurve *curve, std::vector<Geom::Point> *intersections){ +void calculate_intersections(SPDesktop * /*desktop*/, SPItem* item, Geom::PathVector *lineseg, SPCurve *curve, std::vector<Geom::Point> *intersections) +{ curve->transform(item->i2doc_affine()); // Find all intersections of the control-line with this shape diff --git a/src/sp-object-group.cpp b/src/sp-object-group.cpp index 001d7898f..65fbc0295 100644 --- a/src/sp-object-group.cpp +++ b/src/sp-object-group.cpp @@ -41,7 +41,7 @@ GType SPObjectGroup::sp_objectgroup_get_type(void) void SPObjectGroupClass::sp_objectgroup_class_init(SPObjectGroupClass *klass) { - GObjectClass * object_class = (GObjectClass *) klass; + //GObjectClass * object_class = (GObjectClass *) klass; SPObjectClass * sp_object_class = (SPObjectClass *) klass; static_parent_class = (SPObjectClass *)g_type_class_ref(SP_TYPE_OBJECT); diff --git a/src/sp-paint-server.cpp b/src/sp-paint-server.cpp index dc99639c8..2ed556b23 100644 --- a/src/sp-paint-server.cpp +++ b/src/sp-paint-server.cpp @@ -64,7 +64,7 @@ static void sp_paint_server_class_init(SPPaintServerClass *psc) parent_class = (SPObjectClass *) g_type_class_ref(SP_TYPE_OBJECT); } -void SPPaintServer::init(SPPaintServer *ps) +void SPPaintServer::init(SPPaintServer * /*ps*/) { } diff --git a/src/sp-polyline.cpp b/src/sp-polyline.cpp index 705b9a10b..8dbed2a22 100644 --- a/src/sp-polyline.cpp +++ b/src/sp-polyline.cpp @@ -46,7 +46,7 @@ GType SPPolyLine::sp_polyline_get_type(void) void SPPolyLineClass::sp_polyline_class_init(SPPolyLineClass *klass) { - GObjectClass * gobject_class = (GObjectClass *) klass; + //GObjectClass * gobject_class = (GObjectClass *) klass; SPObjectClass * sp_object_class = (SPObjectClass *) klass; SPItemClass * item_class = (SPItemClass *) klass; @@ -134,7 +134,7 @@ void SPPolyLine::set(SPObject *object, unsigned int key, const gchar *value) Inkscape::XML::Node *SPPolyLine::write(SPObject *object, Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { - SPPolyLine *polyline = SP_POLYLINE (object); + SP_POLYLINE(object); if ((flags & SP_OBJECT_WRITE_BUILD) && !repr) { repr = xml_doc->createElement("svg:polyline"); diff --git a/src/ui/dialog/dock-behavior.cpp b/src/ui/dialog/dock-behavior.cpp index 39d671cd8..47cbab485 100644 --- a/src/ui/dialog/dock-behavior.cpp +++ b/src/ui/dialog/dock-behavior.cpp @@ -165,8 +165,7 @@ DockBehavior::set_title(Glib::ustring title) _dock_item.set_title(title); } -void -DockBehavior::set_sensitive(bool sensitive) +void DockBehavior::set_sensitive(bool sensitive) { // TODO check this. Seems to be bad that we ignore the parameter get_vbox()->set_sensitive(); diff --git a/src/widgets/gradient-image.cpp b/src/widgets/gradient-image.cpp index ef05ad381..115935f50 100644 --- a/src/widgets/gradient-image.cpp +++ b/src/widgets/gradient-image.cpp @@ -106,11 +106,10 @@ sp_gradient_image_destroy (GtkObject *object) (* ((GtkObjectClass *) (parent_class))->destroy) (object); } -static void -sp_gradient_image_size_request (GtkWidget *widget, GtkRequisition *requisition) +static void sp_gradient_image_size_request(GtkWidget * /*widget*/, GtkRequisition *requisition) { - requisition->width = 64; - requisition->height = 12; + requisition->width = 64; + requisition->height = 12; } static gint |
