summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/display/cairo-utils.cpp3
-rw-r--r--src/display/drawing-image.cpp3
-rw-r--r--src/display/drawing-item.h12
-rw-r--r--src/display/drawing-shape.cpp3
-rw-r--r--src/display/drawing-text.cpp9
-rw-r--r--src/helper/action.cpp2
-rw-r--r--src/helper/pixbuf-ops.cpp40
-rw-r--r--src/snap.cpp2
-rw-r--r--src/sp-cursor.cpp2
-rw-r--r--src/sp-image.cpp2
-rw-r--r--src/sp-item.cpp2
-rw-r--r--src/svg/svg-length.cpp2
12 files changed, 36 insertions, 46 deletions
diff --git a/src/display/cairo-utils.cpp b/src/display/cairo-utils.cpp
index 8b75f09a6..a12a3d560 100644
--- a/src/display/cairo-utils.cpp
+++ b/src/display/cairo-utils.cpp
@@ -350,8 +350,7 @@ ink_cairo_surface_create_for_argb32_pixbuf(GdkPixbuf *pb)
* to gdk_pixbuf_new_from_data when creating a GdkPixbuf backed by
* a Cairo surface.
*/
-void
-ink_cairo_pixbuf_cleanup(guchar *pixels, void *data)
+void ink_cairo_pixbuf_cleanup(guchar * /*pixels*/, void *data)
{
cairo_surface_t *surface = reinterpret_cast<cairo_surface_t*>(data);
cairo_surface_destroy(surface);
diff --git a/src/display/drawing-image.cpp b/src/display/drawing-image.cpp
index fa0402699..20a1eb795 100644
--- a/src/display/drawing-image.cpp
+++ b/src/display/drawing-image.cpp
@@ -112,8 +112,7 @@ DrawingImage::_updateItem(Geom::IntRect const &, UpdateContext const &, unsigned
return STATE_ALL;
}
-unsigned
-DrawingImage::_renderItem(DrawingContext &ct, Geom::IntRect const &area, unsigned flags, DrawingItem *stop_at)
+unsigned DrawingImage::_renderItem(DrawingContext &ct, Geom::IntRect const &/*area*/, unsigned /*flags*/, DrawingItem * /*stop_at*/)
{
bool outline = _drawing.outline();
diff --git a/src/display/drawing-item.h b/src/display/drawing-item.h
index 424616427..ca8b21336 100644
--- a/src/display/drawing-item.h
+++ b/src/display/drawing-item.h
@@ -133,12 +133,12 @@ protected:
void _setStyleCommon(SPStyle *&_style, SPStyle *style);
double _cacheScore();
Geom::OptIntRect _cacheRect();
- virtual unsigned _updateItem(Geom::IntRect const &area, UpdateContext const &ctx,
- unsigned flags, unsigned reset) { return 0; }
- virtual unsigned _renderItem(DrawingContext &ct, Geom::IntRect const &area, unsigned flags,
- DrawingItem *stop_at) { return RENDER_OK; }
- virtual void _clipItem(DrawingContext &ct, Geom::IntRect const &area) {}
- virtual DrawingItem *_pickItem(Geom::Point const &p, double delta, unsigned flags) { return NULL; }
+ virtual unsigned _updateItem(Geom::IntRect const &/*area*/, UpdateContext const &/*ctx*/,
+ unsigned /*flags*/, unsigned /*reset*/) { return 0; }
+ virtual unsigned _renderItem(DrawingContext &/*ct*/, Geom::IntRect const &/*area*/, unsigned /*flags*/,
+ DrawingItem * /*stop_at*/) { return RENDER_OK; }
+ virtual void _clipItem(DrawingContext &/*ct*/, Geom::IntRect const &/*area*/) {}
+ virtual DrawingItem *_pickItem(Geom::Point const &/*p*/, double /*delta*/, unsigned /*flags*/) { return NULL; }
virtual bool _canClip() { return false; }
// member variables start here
diff --git a/src/display/drawing-shape.cpp b/src/display/drawing-shape.cpp
index 6e28c0184..93a4846e0 100644
--- a/src/display/drawing-shape.cpp
+++ b/src/display/drawing-shape.cpp
@@ -205,8 +205,7 @@ DrawingShape::_renderItem(DrawingContext &ct, Geom::IntRect const &area, unsigne
return RENDER_OK;
}
-void
-DrawingShape::_clipItem(DrawingContext &ct, Geom::IntRect const &area)
+void DrawingShape::_clipItem(DrawingContext &ct, Geom::IntRect const & /*area*/)
{
if (!_curve) return;
diff --git a/src/display/drawing-text.cpp b/src/display/drawing-text.cpp
index 23a7cfdfb..6dde9634e 100644
--- a/src/display/drawing-text.cpp
+++ b/src/display/drawing-text.cpp
@@ -50,8 +50,7 @@ DrawingGlyphs::setGlyph(font_instance *font, int glyph, Geom::Affine const &tran
_markForUpdate(STATE_ALL, false);
}
-unsigned
-DrawingGlyphs::_updateItem(Geom::IntRect const &area, UpdateContext const &ctx, unsigned flags, unsigned reset)
+unsigned DrawingGlyphs::_updateItem(Geom::IntRect const &/*area*/, UpdateContext const &ctx, unsigned /*flags*/, unsigned /*reset*/)
{
DrawingText *ggroup = dynamic_cast<DrawingText *>(_parent);
if (!ggroup) throw InvalidItemException();
@@ -146,8 +145,7 @@ DrawingText::_updateItem(Geom::IntRect const &area, UpdateContext const &ctx, un
return DrawingGroup::_updateItem(area, ctx, flags, reset);
}
-unsigned
-DrawingText::_renderItem(DrawingContext &ct, Geom::IntRect const &area, unsigned flags, DrawingItem *stop_at)
+unsigned DrawingText::_renderItem(DrawingContext &ct, Geom::IntRect const &/*area*/, unsigned /*flags*/, DrawingItem * /*stop_at*/)
{
if (_drawing.outline()) {
guint32 rgba = _drawing.outlinecolor;
@@ -201,8 +199,7 @@ DrawingText::_renderItem(DrawingContext &ct, Geom::IntRect const &area, unsigned
return RENDER_OK;
}
-void
-DrawingText::_clipItem(DrawingContext &ct, Geom::IntRect const &area)
+void DrawingText::_clipItem(DrawingContext &ct, Geom::IntRect const &/*area*/)
{
Inkscape::DrawingContext::Save save(ct);
diff --git a/src/helper/action.cpp b/src/helper/action.cpp
index 3eb881300..532078a3d 100644
--- a/src/helper/action.cpp
+++ b/src/helper/action.cpp
@@ -157,7 +157,7 @@ public:
\param data ignored
*/
void
-sp_action_perform (SPAction *action, void * data)
+sp_action_perform (SPAction *action, void * /*data*/)
{
g_return_if_fail (action != NULL);
g_return_if_fail (SP_IS_ACTION (action));
diff --git a/src/helper/pixbuf-ops.cpp b/src/helper/pixbuf-ops.cpp
index 3f987dc01..9f80cc58b 100644
--- a/src/helper/pixbuf-ops.cpp
+++ b/src/helper/pixbuf-ops.cpp
@@ -64,28 +64,23 @@ static void hide_other_items_recursively(SPObject *o, GSList *list, unsigned dke
// The dpi settings dont do anything yet, but I want them to, and was wanting to keep reasonably close
// to the call for the interface to the png writing.
-bool
-sp_export_jpg_file(SPDocument *doc, gchar const *filename,
- double x0, double y0, double x1, double y1,
- unsigned width, unsigned height, double xdpi, double ydpi,
- unsigned long bgcolor, double quality,GSList *items)
-
+bool sp_export_jpg_file(SPDocument *doc, gchar const *filename,
+ double x0, double y0, double x1, double y1,
+ unsigned width, unsigned height, double xdpi, double ydpi,
+ unsigned long bgcolor, double quality,GSList *items)
{
-
-
- GdkPixbuf* pixbuf;
- pixbuf = sp_generate_internal_bitmap(doc, filename, x0, y0, x1, y1,
+ GdkPixbuf* pixbuf = 0;
+ pixbuf = sp_generate_internal_bitmap(doc, filename, x0, y0, x1, y1,
width, height, xdpi, ydpi,
bgcolor, items );
+ gchar c[32];
+ g_snprintf(c, 32, "%f", quality);
+ gboolean saved = gdk_pixbuf_save (pixbuf, filename, "jpeg", NULL, "quality", c, NULL);
+ g_free(c);
+ gdk_pixbuf_unref (pixbuf);
- gchar c[32];
- g_snprintf(c, 32, "%f", quality);
- gboolean saved = gdk_pixbuf_save (pixbuf, filename, "jpeg", NULL, "quality", c, NULL);
- g_free(c);
- gdk_pixbuf_unref (pixbuf);
- if (saved) return true;
- else return false;
+ return saved;
}
/**
@@ -101,12 +96,11 @@ sp_export_jpg_file(SPDocument *doc, gchar const *filename,
@param ydpi
@return the created GdkPixbuf structure or NULL if no memory is allocable
*/
-GdkPixbuf*
-sp_generate_internal_bitmap(SPDocument *doc, gchar const */*filename*/,
- double x0, double y0, double x1, double y1,
- unsigned width, unsigned height, double xdpi, double ydpi,
- unsigned long bgcolor,
- GSList *items_only)
+GdkPixbuf *sp_generate_internal_bitmap(SPDocument *doc, gchar const */*filename*/,
+ double x0, double y0, double x1, double y1,
+ unsigned width, unsigned height, double xdpi, double ydpi,
+ unsigned long /*bgcolor*/,
+ GSList *items_only)
{
if (width == 0 || height == 0) return NULL;
diff --git a/src/snap.cpp b/src/snap.cpp
index eeca66d74..b2c5a5a10 100644
--- a/src/snap.cpp
+++ b/src/snap.cpp
@@ -568,7 +568,7 @@ Inkscape::SnappedPoint SnapManager::constrainedAngularSnap(Inkscape::SnapCandida
* \param p Current position of the point on the guide that is to be snapped; will be overwritten by the position of the snap target if snapping has occurred
* \param guide_normal Vector normal to the guide line
*/
-void SnapManager::guideFreeSnap(Geom::Point &p, Geom::Point const &guide_normal, SPGuideDragType drag_type) const
+void SnapManager::guideFreeSnap(Geom::Point &p, Geom::Point const &/*guide_normal*/, SPGuideDragType drag_type) const
{
if (!snapprefs.getSnapEnabledGlobally() || snapprefs.getSnapPostponedGlobally() || !snapprefs.isTargetSnappable(Inkscape::SNAPTARGET_GUIDE)) {
return;
diff --git a/src/sp-cursor.cpp b/src/sp-cursor.cpp
index cc52f3c97..eb1e16888 100644
--- a/src/sp-cursor.cpp
+++ b/src/sp-cursor.cpp
@@ -91,7 +91,7 @@ void sp_cursor_bitmap_and_mask_from_xpm(GdkBitmap **bitmap, GdkBitmap **mask, gc
*mask = gdk_bitmap_create_from_data(NULL, mask_buffer, 32, 32);
}
-static void free_cursor_data(guchar *pixels, gpointer data) {
+static void free_cursor_data(guchar *pixels, gpointer /*data*/) {
delete [] reinterpret_cast<guint32*>(pixels);
}
diff --git a/src/sp-image.cpp b/src/sp-image.cpp
index 1bfcc90e5..46969897f 100644
--- a/src/sp-image.cpp
+++ b/src/sp-image.cpp
@@ -1062,7 +1062,7 @@ static Inkscape::XML::Node *sp_image_write( SPObject *object, Inkscape::XML::Doc
return repr;
}
-static Geom::OptRect sp_image_bbox( SPItem const *item,Geom::Affine const &transform, SPItem::BBoxType type )
+static Geom::OptRect sp_image_bbox( SPItem const *item,Geom::Affine const &transform, SPItem::BBoxType /*type*/ )
{
SPImage const &image = *SP_IMAGE(item);
Geom::OptRect bbox;
diff --git a/src/sp-item.cpp b/src/sp-item.cpp
index 3ec5f249b..a4d66cf1a 100644
--- a/src/sp-item.cpp
+++ b/src/sp-item.cpp
@@ -846,7 +846,7 @@ unsigned SPItem::pos_in_parent()
return 0;
}
-void SPItem::sp_item_private_snappoints(SPItem const *item, std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape::SnapPreferences const *snapprefs)
+void SPItem::sp_item_private_snappoints(SPItem const * /*item*/, std::vector<Inkscape::SnapCandidatePoint> &/*p*/, Inkscape::SnapPreferences const * /*snapprefs*/)
{
/* This will only be called if the derived class doesn't override this.
* see for example sp_genericellipse_snappoints in sp-ellipse.cpp
diff --git a/src/svg/svg-length.cpp b/src/svg/svg-length.cpp
index 3f04588ea..6b00cc807 100644
--- a/src/svg/svg-length.cpp
+++ b/src/svg/svg-length.cpp
@@ -80,6 +80,7 @@ static unsigned int sp_svg_number_write_ui(gchar *buf, unsigned int val)
return i;
}
+// TODO unsafe code ingnoring bufLen
static unsigned int sp_svg_number_write_i(gchar *buf, int bufLen, int val)
{
int p = 0;
@@ -96,6 +97,7 @@ static unsigned int sp_svg_number_write_i(gchar *buf, int bufLen, int val)
return p;
}
+// TODO unsafe code ingnoring bufLen
static unsigned sp_svg_number_write_d(gchar *buf, int bufLen, double val, unsigned int tprec, unsigned int fprec)
{
/* Process sign */