summaryrefslogtreecommitdiffstats
path: root/src/display
diff options
context:
space:
mode:
authorJon A. Cruz <jon@joncruz.org>2011-06-22 10:07:58 +0000
committerJon A. Cruz <jon@joncruz.org>2011-06-22 10:07:58 +0000
commit8640e3a8755e772cc7982a9d6f8a47c6ee0dae00 (patch)
tree2f9cdb1b9e13dc49a810fdfca4eb575610a948cb /src/display
parentRevision 10333 introduced dependency on gtk version 2.24 which is currently n... (diff)
downloadinkscape-8640e3a8755e772cc7982a9d6f8a47c6ee0dae00.tar.gz
inkscape-8640e3a8755e772cc7982a9d6f8a47c6ee0dae00.zip
Warning cleanup.
(bzr r10339)
Diffstat (limited to 'src/display')
-rw-r--r--src/display/nr-arena-glyphs.cpp19
-rw-r--r--src/display/nr-arena-image.cpp10
-rw-r--r--src/display/nr-arena-item.cpp3
-rw-r--r--src/display/nr-arena-shape.cpp24
-rw-r--r--src/display/nr-filter-diffuselighting.cpp2
-rw-r--r--src/display/nr-filter-primitive.h2
-rw-r--r--src/display/nr-filter-specularlighting.cpp2
-rw-r--r--src/display/nr-filter-turbulence.cpp3
-rw-r--r--src/display/sp-canvas-util.cpp3
-rw-r--r--src/display/sp-canvas.cpp3
10 files changed, 37 insertions, 34 deletions
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);