summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKris De Gussem <kris.degussem@gmail.com>2011-12-17 20:43:37 +0000
committerKris <Kris.De.Gussem@hotmail.com>2011-12-17 20:43:37 +0000
commitc9d06adc5f8252eb3d2a90570d65afd0fd4c891b (patch)
tree5467605011156e622a99c369cf05b9ed7bfa16bc /src
parentDropped unused SPAttributeWidget (diff)
downloadinkscape-c9d06adc5f8252eb3d2a90570d65afd0fd4c891b.tar.gz
inkscape-c9d06adc5f8252eb3d2a90570d65afd0fd4c891b.zip
some static code analysis stuff (cppcheck warnings)
(bzr r10779)
Diffstat (limited to 'src')
-rw-r--r--src/display/canvas-axonomgrid.cpp2
-rw-r--r--src/display/gnome-canvas-acetate.cpp4
-rw-r--r--src/extension/dxf2svg/blocks.cpp5
-rw-r--r--src/extension/effect.h6
-rw-r--r--src/extension/implementation/script.cpp2
-rw-r--r--src/extension/internal/latex-text-renderer.cpp4
6 files changed, 5 insertions, 18 deletions
diff --git a/src/display/canvas-axonomgrid.cpp b/src/display/canvas-axonomgrid.cpp
index b5fa9e10a..bdc323f8d 100644
--- a/src/display/canvas-axonomgrid.cpp
+++ b/src/display/canvas-axonomgrid.cpp
@@ -690,7 +690,7 @@ CanvasAxonomGridSnapper::_getSnapLines(Geom::Point const &p) const
{
inters = Geom::intersection(line_x, line_z);
}
- catch (Geom::InfiniteSolutions e)
+ catch (Geom::InfiniteSolutions &e)
{
// We're probably dealing with parallel lines; this is useless!
return s;
diff --git a/src/display/gnome-canvas-acetate.cpp b/src/display/gnome-canvas-acetate.cpp
index 544efe61f..d6ebfa175 100644
--- a/src/display/gnome-canvas-acetate.cpp
+++ b/src/display/gnome-canvas-acetate.cpp
@@ -67,13 +67,9 @@ static void sp_canvas_acetate_init (SPCanvasAcetate */*acetate*/)
static void sp_canvas_acetate_destroy (GtkObject *object)
{
- SPCanvasAcetate *acetate;
-
g_return_if_fail (object != NULL);
g_return_if_fail (GNOME_IS_CANVAS_ACETATE (object));
- acetate = SP_CANVAS_ACETATE (object);
-
if (GTK_OBJECT_CLASS (parent_class)->destroy)
(* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
}
diff --git a/src/extension/dxf2svg/blocks.cpp b/src/extension/dxf2svg/blocks.cpp
index 75f348bde..36f2b9e7e 100644
--- a/src/extension/dxf2svg/blocks.cpp
+++ b/src/extension/dxf2svg/blocks.cpp
@@ -39,13 +39,8 @@ void block::block_info( std::vector< dxfpair > info){
}
-
-
-
-
blocks::blocks(std::vector< std::vector< dxfpair > > sections){
// Read the main information about the entities section and then put it in the enetites class
- int value;
char string[10000];
std::vector< dxfpair > single_line;
std::vector< std::vector< dxfpair > > ents;
diff --git a/src/extension/effect.h b/src/extension/effect.h
index 61a826ad4..83b5cc036 100644
--- a/src/extension/effect.h
+++ b/src/extension/effect.h
@@ -24,11 +24,7 @@
struct SPDocument;
namespace Inkscape {
-namespace UI {
-namespace View {
-typedef View View;
-};
-};
+
namespace Extension {
diff --git a/src/extension/implementation/script.cpp b/src/extension/implementation/script.cpp
index 08624aff0..0a0282284 100644
--- a/src/extension/implementation/script.cpp
+++ b/src/extension/implementation/script.cpp
@@ -971,7 +971,7 @@ int Script::execute (const std::list<std::string> &in_command,
NULL, // STDIN
&stdout_pipe, // STDOUT
&stderr_pipe); // STDERR
- } catch (Glib::Error e) {
+ } catch (Glib::Error &e) {
printf("Can't Spawn!!! spawn returns: %s\n", e.what().data());
return 0;
}
diff --git a/src/extension/internal/latex-text-renderer.cpp b/src/extension/internal/latex-text-renderer.cpp
index 6244512a4..0134ea895 100644
--- a/src/extension/internal/latex-text-renderer.cpp
+++ b/src/extension/internal/latex-text-renderer.cpp
@@ -266,7 +266,7 @@ LaTeXTextRenderer::sp_text_render(SPItem *item)
SPText *textobj = SP_TEXT (item);
SPStyle *style = item->style;
- gchar *strtext = sp_te_get_string_multiline(item);
+ /*gchar *strtext = sp_te_get_string_multiline(item);
if (!strtext) {
return;
}
@@ -274,7 +274,7 @@ LaTeXTextRenderer::sp_text_render(SPItem *item)
gchar ** splitstr = g_strsplit(strtext, "\n", -1);
gchar *str = g_strjoinv("\\\\ ", splitstr);
g_free(strtext);
- g_strfreev(splitstr);
+ g_strfreev(splitstr);*/
// get position and alignment
// Align vertically on the baseline of the font (retreived from the anchor point)