summaryrefslogtreecommitdiffstats
path: root/src/extension
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/extension
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/extension')
-rw-r--r--src/extension/internal/cairo-png-out.cpp13
-rw-r--r--src/extension/internal/cairo-render-context.cpp15
-rw-r--r--src/extension/internal/cairo-renderer-pdf-out.cpp12
-rw-r--r--src/extension/internal/wpg-input.cpp4
4 files changed, 22 insertions, 22 deletions
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