summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJon A. Cruz <jon@joncruz.org>2007-11-25 08:46:19 +0000
committerjoncruz <joncruz@users.sourceforge.net>2007-11-25 08:46:19 +0000
commited8752817b2f935fc51a00e167e2f21e583194b8 (patch)
tree6be763af98fe17e22aff5d45ad84a3c0b5a2b566 /src
parentImplemented per-monitor display adjustment via XICC (diff)
downloadinkscape-ed8752817b2f935fc51a00e167e2f21e583194b8.tar.gz
inkscape-ed8752817b2f935fc51a00e167e2f21e583194b8.zip
Warning cleanup
(bzr r4133)
Diffstat (limited to 'src')
-rw-r--r--src/dialogs/debugdialog.cpp4
-rw-r--r--src/dialogs/eek-color-def.cpp3
-rw-r--r--src/dialogs/eek-preview.cpp5
-rw-r--r--src/dialogs/input.cpp6
-rw-r--r--src/dialogs/sp-attribute-widget.cpp178
-rw-r--r--src/dialogs/xml-tree.cpp126
-rw-r--r--src/display/nr-filter-colormatrix.cpp12
-rw-r--r--src/display/nr-filter-component-transfer.cpp8
-rw-r--r--src/display/nr-filter-composite.cpp2
-rw-r--r--src/display/nr-filter-convolve-matrix.cpp6
-rw-r--r--src/display/nr-filter-displacement-map.cpp18
-rw-r--r--src/display/nr-filter-flood.cpp8
-rw-r--r--src/display/nr-filter-image.cpp8
-rw-r--r--src/display/nr-filter-merge.cpp6
-rw-r--r--src/display/nr-filter-morphology.cpp16
-rw-r--r--src/display/nr-filter-primitive.cpp2
-rw-r--r--src/display/nr-filter-specularlighting.cpp16
-rw-r--r--src/display/nr-filter-tile.cpp8
-rw-r--r--src/display/nr-filter-turbulence.cpp13
-rw-r--r--src/dom/uri.cpp3
-rw-r--r--src/ege-color-prof-tracker.cpp6
-rw-r--r--src/extension/internal/gdkpixbuf-input.cpp6
-rw-r--r--src/sp-object-group.cpp2
-rw-r--r--src/text-context.cpp84
-rw-r--r--src/vanishing-point.cpp2
25 files changed, 282 insertions, 266 deletions
diff --git a/src/dialogs/debugdialog.cpp b/src/dialogs/debugdialog.cpp
index e90f0a419..42bf96050 100644
--- a/src/dialogs/debugdialog.cpp
+++ b/src/dialogs/debugdialog.cpp
@@ -245,8 +245,8 @@ void DebugDialog::showInstance()
/*##### THIS IS THE IMPORTANT PART ##### */
-void dialogLoggingFunction(const gchar *log_domain,
- GLogLevelFlags log_level,
+void dialogLoggingFunction(const gchar */*log_domain*/,
+ GLogLevelFlags /*log_level*/,
const gchar *messageText,
gpointer user_data)
{
diff --git a/src/dialogs/eek-color-def.cpp b/src/dialogs/eek-color-def.cpp
index bb7b69a8a..9a079b68f 100644
--- a/src/dialogs/eek-color-def.cpp
+++ b/src/dialogs/eek-color-def.cpp
@@ -129,7 +129,8 @@ void ColorDef::addCallback( ColorCallback cb, void* data )
void ColorDef::removeCallback( ColorCallback cb, void* data )
{
-
+ (void)cb;
+ (void)data;
}
diff --git a/src/dialogs/eek-preview.cpp b/src/dialogs/eek-preview.cpp
index 0108d4777..411491777 100644
--- a/src/dialogs/eek-preview.cpp
+++ b/src/dialogs/eek-preview.cpp
@@ -128,6 +128,7 @@ gboolean eek_preview_expose_event( GtkWidget* widget, GdkEventExpose* event )
gint insetX = 0;
gint insetY = 0;
+ (void)event;
/*
gint lower = widget->allocation.width;
lower = (widget->allocation.height < lower) ? widget->allocation.height : lower;
@@ -345,12 +346,16 @@ static gboolean eek_preview_button_release_cb( GtkWidget* widget, GdkEventButton
gboolean eek_preview_key_press_event( GtkWidget* widget, GdkEventKey* event)
{
+ (void)widget;
+ (void)event;
g_message("TICK");
return FALSE;
}
gboolean eek_preview_key_release_event( GtkWidget* widget, GdkEventKey* event)
{
+ (void)widget;
+ (void)event;
g_message("tock");
return FALSE;
}
diff --git a/src/dialogs/input.cpp b/src/dialogs/input.cpp
index 21a6ea4a7..4cad0b64c 100644
--- a/src/dialogs/input.cpp
+++ b/src/dialogs/input.cpp
@@ -38,7 +38,7 @@ static gint x = -1000, y = -1000, w = 0, h = 0;
static gchar *prefs_path = "dialogs.input";
static void
-sp_input_dialog_destroy (GtkObject *object, gpointer data)
+sp_input_dialog_destroy (GtkObject */*object*/, gpointer /*data*/)
{
sp_signal_disconnect_by_data (INKSCAPE, dlg);
wd.win = dlg = NULL;
@@ -46,7 +46,7 @@ sp_input_dialog_destroy (GtkObject *object, gpointer data)
}
static gboolean
-sp_input_dialog_delete (GtkObject *object, GdkEvent *event, gpointer data)
+sp_input_dialog_delete (GtkObject */*object*/, GdkEvent */*event*/, gpointer /*data*/)
{
gtk_window_get_position ((GtkWindow *) dlg, &x, &y);
gtk_window_get_size ((GtkWindow *) dlg, &w, &h);
@@ -203,7 +203,7 @@ sp_input_save_to_preferences (void)
}
static void
-sp_input_save_button (GtkObject *object, gpointer data)
+sp_input_save_button (GtkObject */*object*/, gpointer /*data*/)
{
sp_input_save_to_preferences();
}
diff --git a/src/dialogs/sp-attribute-widget.cpp b/src/dialogs/sp-attribute-widget.cpp
index 1c450cff5..92da747a4 100644
--- a/src/dialogs/sp-attribute-widget.cpp
+++ b/src/dialogs/sp-attribute-widget.cpp
@@ -35,10 +35,10 @@ static void sp_attribute_widget_destroy (GtkObject *object);
static void sp_attribute_widget_changed (GtkEditable *editable);
-static void sp_attribute_widget_object_modified ( SPObject *object,
- guint flags,
+static void sp_attribute_widget_object_modified ( SPObject *object,
+ guint flags,
SPAttributeWidget *spaw );
-static void sp_attribute_widget_object_release ( SPObject *object,
+static void sp_attribute_widget_object_release ( SPObject *object,
SPAttributeWidget *spaw );
static GtkEntryClass *parent_class;
@@ -62,7 +62,7 @@ sp_attribute_widget_get_type (void)
type = gtk_type_unique (GTK_TYPE_ENTRY, &info);
}
return type;
-
+
} // end of sp_attribute_widget_get_type()
@@ -107,7 +107,7 @@ sp_attribute_widget_init (SPAttributeWidget *spaw)
static void
sp_attribute_widget_destroy (GtkObject *object)
{
-
+
SPAttributeWidget *spaw;
spaw = SP_ATTRIBUTE_WIDGET (object);
@@ -117,16 +117,16 @@ sp_attribute_widget_destroy (GtkObject *object)
spaw->attribute = NULL;
}
-
+
if (spaw->hasobj) {
-
+
if (spaw->src.object) {
spaw->modified_connection.disconnect();
spaw->release_connection.disconnect();
spaw->src.object = NULL;
}
} else {
-
+
if (spaw->src.repr) {
spaw->src.repr = Inkscape::GC::release(spaw->src.repr);
}
@@ -134,7 +134,7 @@ sp_attribute_widget_destroy (GtkObject *object)
spaw->modified_connection.~connection();
spaw->release_connection.~connection();
-
+
((GtkObjectClass *) parent_class)->destroy (object);
}
@@ -150,27 +150,27 @@ sp_attribute_widget_changed (GtkEditable *editable)
spaw = SP_ATTRIBUTE_WIDGET (editable);
if (!spaw->blocked) {
-
+
const gchar *text;
spaw->blocked = TRUE;
text = gtk_entry_get_text (GTK_ENTRY (spaw));
- if (!*text)
+ if (!*text)
text = NULL;
-
+
if (spaw->hasobj && spaw->src.object) {
-
- if (!sp_repr_set_attr ( SP_OBJECT_REPR (spaw->src.object),
+
+ if (!sp_repr_set_attr ( SP_OBJECT_REPR (spaw->src.object),
spaw->attribute, text) )
{
/* Cannot set attribute */
text = SP_OBJECT_REPR (spaw->src.object)->attribute(spaw->attribute);
gtk_entry_set_text (GTK_ENTRY (spaw), text ? text : "");
}
- sp_document_done (SP_OBJECT_DOCUMENT (spaw->src.object), SP_VERB_NONE,
+ sp_document_done (SP_OBJECT_DOCUMENT (spaw->src.object), SP_VERB_NONE,
_("Set attribute"));
-
+
} else if (spaw->src.repr) {
-
+
if (!sp_repr_set_attr (spaw->src.repr, spaw->attribute, text))
{
/* Cannot set attribute */
@@ -181,7 +181,7 @@ sp_attribute_widget_changed (GtkEditable *editable)
}
spaw->blocked = FALSE;
}
-
+
} // end of sp_attribute_widget_changed()
@@ -199,7 +199,7 @@ sp_attribute_widget_new ( SPObject *object, const gchar *attribute )
sp_attribute_widget_set_object (spaw, object, attribute);
return GTK_WIDGET (spaw);
-
+
} // end of sp_attribute_widget_new()
@@ -219,8 +219,8 @@ sp_attribute_widget_new_repr ( Inkscape::XML::Node *repr, const gchar *attribute
void
-sp_attribute_widget_set_object ( SPAttributeWidget *spaw,
- SPObject *object,
+sp_attribute_widget_set_object ( SPAttributeWidget *spaw,
+ SPObject *object,
const gchar *attribute )
{
@@ -236,14 +236,14 @@ sp_attribute_widget_set_object ( SPAttributeWidget *spaw,
}
if (spaw->hasobj) {
-
+
if (spaw->src.object) {
spaw->modified_connection.disconnect();
spaw->release_connection.disconnect();
spaw->src.object = NULL;
}
} else {
-
+
if (spaw->src.repr) {
spaw->src.repr = Inkscape::GC::release(spaw->src.repr);
}
@@ -274,8 +274,8 @@ sp_attribute_widget_set_object ( SPAttributeWidget *spaw,
void
-sp_attribute_widget_set_repr ( SPAttributeWidget *spaw,
- Inkscape::XML::Node *repr,
+sp_attribute_widget_set_repr ( SPAttributeWidget *spaw,
+ Inkscape::XML::Node *repr,
const gchar *attribute )
{
@@ -289,14 +289,14 @@ sp_attribute_widget_set_repr ( SPAttributeWidget *spaw,
}
if (spaw->hasobj) {
-
+
if (spaw->src.object) {
spaw->modified_connection.disconnect();
spaw->release_connection.disconnect();
spaw->src.object = NULL;
}
} else {
-
+
if (spaw->src.repr) {
spaw->src.repr = Inkscape::GC::release(spaw->src.repr);
}
@@ -323,29 +323,29 @@ sp_attribute_widget_set_repr ( SPAttributeWidget *spaw,
static void
-sp_attribute_widget_object_modified ( SPObject *object,
- guint flags,
+sp_attribute_widget_object_modified ( SPObject */*object*/,
+ guint flags,
SPAttributeWidget *spaw )
{
if (flags && SP_OBJECT_MODIFIED_FLAG) {
-
+
const gchar *val, *text;
val = SP_OBJECT_REPR (spaw->src.object)->attribute(spaw->attribute);
text = gtk_entry_get_text (GTK_ENTRY (spaw));
-
+
if (val || text) {
-
+
if (!val || !text || strcmp (val, text)) {
/* We are different */
spaw->blocked = TRUE;
- gtk_entry_set_text ( GTK_ENTRY (spaw),
+ gtk_entry_set_text ( GTK_ENTRY (spaw),
val ? val : (const gchar *) "");
spaw->blocked = FALSE;
} // end of if()
-
+
} // end of if()
-
+
} //end of if()
} // end of sp_attribute_widget_object_modified()
@@ -353,7 +353,7 @@ sp_attribute_widget_object_modified ( SPObject *object,
static void
-sp_attribute_widget_object_release ( SPObject *object,
+sp_attribute_widget_object_release ( SPObject */*object*/,
SPAttributeWidget *spaw )
{
sp_attribute_widget_set_object (spaw, NULL, NULL);
@@ -446,7 +446,7 @@ sp_attribute_table_destroy ( GtkObject *object )
}
if (spat->hasobj) {
-
+
if (spat->src.object) {
spat->modified_connection.disconnect();
spat->release_connection.disconnect();
@@ -460,7 +460,7 @@ sp_attribute_table_destroy ( GtkObject *object )
spat->modified_connection.~connection();
spat->release_connection.~connection();
-
+
if (spat->entries) {
g_free (spat->entries);
spat->entries = NULL;
@@ -471,14 +471,14 @@ sp_attribute_table_destroy ( GtkObject *object )
if (((GtkObjectClass *) table_parent_class)->destroy) {
(* ((GtkObjectClass *) table_parent_class)->destroy) (object);
}
-
+
} // end of sp_attribute_table_destroy()
GtkWidget *
-sp_attribute_table_new ( SPObject *object,
- gint num_attr,
- const gchar **labels,
+sp_attribute_table_new ( SPObject *object,
+ gint num_attr,
+ const gchar **labels,
const gchar **attributes )
{
SPAttributeTable *spat;
@@ -498,9 +498,9 @@ sp_attribute_table_new ( SPObject *object,
GtkWidget *
-sp_attribute_table_new_repr ( Inkscape::XML::Node *repr,
- gint num_attr,
- const gchar **labels,
+sp_attribute_table_new_repr ( Inkscape::XML::Node *repr,
+ gint num_attr,
+ const gchar **labels,
const gchar **attributes )
{
SPAttributeTable *spat;
@@ -521,10 +521,10 @@ sp_attribute_table_new_repr ( Inkscape::XML::Node *repr,
#define YPAD 0
void
-sp_attribute_table_set_object ( SPAttributeTable *spat,
- SPObject *object,
- gint num_attr,
- const gchar **labels,
+sp_attribute_table_set_object ( SPAttributeTable *spat,
+ SPObject *object,
+ gint num_attr,
+ const gchar **labels,
const gchar **attributes )
{
@@ -594,21 +594,21 @@ sp_attribute_table_set_object ( SPAttributeTable *spat,
w = gtk_label_new (_(labels[i]));
gtk_widget_show (w);
gtk_misc_set_alignment (GTK_MISC (w), 1.0, 0.5);
- gtk_table_attach ( GTK_TABLE (spat->table), w, 0, 1, i, i + 1,
- GTK_FILL,
- (GtkAttachOptions)(GTK_EXPAND | GTK_FILL),
+ gtk_table_attach ( GTK_TABLE (spat->table), w, 0, 1, i, i + 1,
+ GTK_FILL,
+ (GtkAttachOptions)(GTK_EXPAND | GTK_FILL),
XPAD, YPAD );
w = gtk_entry_new ();
gtk_widget_show (w);
val = SP_OBJECT_REPR (object)->attribute(attributes[i]);
gtk_entry_set_text (GTK_ENTRY (w), val ? val : (const gchar *) "");
- gtk_table_attach ( GTK_TABLE (spat->table), w, 1, 2, i, i + 1,
- (GtkAttachOptions)(GTK_EXPAND | GTK_FILL),
- (GtkAttachOptions)(GTK_EXPAND | GTK_FILL),
+ gtk_table_attach ( GTK_TABLE (spat->table), w, 1, 2, i, i + 1,
+ (GtkAttachOptions)(GTK_EXPAND | GTK_FILL),
+ (GtkAttachOptions)(GTK_EXPAND | GTK_FILL),
XPAD, YPAD );
spat->entries[i] = w;
- g_signal_connect ( G_OBJECT (w), "changed",
- G_CALLBACK (sp_attribute_table_entry_changed),
+ g_signal_connect ( G_OBJECT (w), "changed",
+ G_CALLBACK (sp_attribute_table_entry_changed),
spat );
}
/* Show table */
@@ -617,7 +617,7 @@ sp_attribute_table_set_object ( SPAttributeTable *spat,
spat->blocked = FALSE;
}
- gtk_widget_set_sensitive ( GTK_WIDGET (spat),
+ gtk_widget_set_sensitive ( GTK_WIDGET (spat),
(spat->src.object != NULL) );
} // end of sp_attribute_table_set_object()
@@ -625,10 +625,10 @@ sp_attribute_table_set_object ( SPAttributeTable *spat,
void
-sp_attribute_table_set_repr ( SPAttributeTable *spat,
- Inkscape::XML::Node *repr,
- gint num_attr,
- const gchar **labels,
+sp_attribute_table_set_repr ( SPAttributeTable *spat,
+ Inkscape::XML::Node *repr,
+ gint num_attr,
+ const gchar **labels,
const gchar **attributes )
{
g_return_if_fail (spat != NULL);
@@ -682,7 +682,7 @@ sp_attribute_table_set_repr ( SPAttributeTable *spat,
/* Arrays */
spat->attributes = g_new0 (gchar *, num_attr);
spat->entries = g_new0 (GtkWidget *, num_attr);
-
+
/* Fill rows */
for (i = 0; i < num_attr; i++) {
GtkWidget *w;
@@ -692,21 +692,21 @@ sp_attribute_table_set_repr ( SPAttributeTable *spat,
w = gtk_label_new (labels[i]);
gtk_widget_show (w);
gtk_misc_set_alignment (GTK_MISC (w), 1.0, 0.5);
- gtk_table_attach ( GTK_TABLE (spat->table), w, 0, 1, i, i + 1,
- GTK_FILL,
- (GtkAttachOptions)(GTK_EXPAND | GTK_FILL),
+ gtk_table_attach ( GTK_TABLE (spat->table), w, 0, 1, i, i + 1,
+ GTK_FILL,
+ (GtkAttachOptions)(GTK_EXPAND | GTK_FILL),
XPAD, YPAD );
w = gtk_entry_new ();
gtk_widget_show (w);
val = repr->attribute(attributes[i]);
gtk_entry_set_text (GTK_ENTRY (w), val ? val : (const gchar *) "");
- gtk_table_attach ( GTK_TABLE (spat->table), w, 1, 2, i, i + 1,
- (GtkAttachOptions)(GTK_EXPAND | GTK_FILL),
- (GtkAttachOptions)(GTK_EXPAND | GTK_FILL),
+ gtk_table_attach ( GTK_TABLE (spat->table), w, 1, 2, i, i + 1,
+ (GtkAttachOptions)(GTK_EXPAND | GTK_FILL),
+ (GtkAttachOptions)(GTK_EXPAND | GTK_FILL),
XPAD, YPAD );
spat->entries[i] = w;
- g_signal_connect ( G_OBJECT (w), "changed",
- G_CALLBACK (sp_attribute_table_entry_changed),
+ g_signal_connect ( G_OBJECT (w), "changed",
+ G_CALLBACK (sp_attribute_table_entry_changed),
spat );
}
/* Show table */
@@ -722,8 +722,8 @@ sp_attribute_table_set_repr ( SPAttributeTable *spat,
static void
-sp_attribute_table_object_modified ( SPObject *object,
- guint flags,
+sp_attribute_table_object_modified ( SPObject */*object*/,
+ guint flags,
SPAttributeTable *spat )
{
if (flags && SP_OBJECT_MODIFIED_FLAG)
@@ -737,20 +737,20 @@ sp_attribute_table_object_modified ( SPObject *object,
if (!val || !text || strcmp (val, text)) {
/* We are different */
spat->blocked = TRUE;
- gtk_entry_set_text ( GTK_ENTRY (spat->entries[i]),
+ gtk_entry_set_text ( GTK_ENTRY (spat->entries[i]),
val ? val : (const gchar *) "");
spat->blocked = FALSE;
}
}
}
} // end of if()
-
+
} // end of sp_attribute_table_object_modified()
static void
-sp_attribute_table_object_release (SPObject *object, SPAttributeTable *spat)
+sp_attribute_table_object_release (SPObject */*object*/, SPAttributeTable *spat)
{
sp_attribute_table_set_object (spat, NULL, 0, NULL, NULL);
}
@@ -758,42 +758,42 @@ sp_attribute_table_object_release (SPObject *object, SPAttributeTable *spat)
static void
-sp_attribute_table_entry_changed ( GtkEditable *editable,
+sp_attribute_table_entry_changed ( GtkEditable *editable,
SPAttributeTable *spat )
{
if (!spat->blocked)
{
gint i;
for (i = 0; i < spat->num_attr; i++) {
-
+
if (GTK_WIDGET (editable) == spat->entries[i]) {
const gchar *text;
spat->blocked = TRUE;
text = gtk_entry_get_text (GTK_ENTRY (spat->entries[i]));
-
- if (!*text)
+
+ if (!*text)
text = NULL;
-
+
if (spat->hasobj && spat->src.object) {
- if (!sp_repr_set_attr ( SP_OBJECT_REPR (spat->src.object),
+ if (!sp_repr_set_attr ( SP_OBJECT_REPR (spat->src.object),
spat->attributes[i], text))
{
/* Cannot set attribute */
text = SP_OBJECT_REPR (spat->src.object)->attribute(spat->attributes[i]);
- gtk_entry_set_text ( GTK_ENTRY (spat->entries[i]),
+ gtk_entry_set_text ( GTK_ENTRY (spat->entries[i]),
text ? text : (const gchar *) "");
}
- sp_document_done (SP_OBJECT_DOCUMENT (spat->src.object), SP_VERB_NONE,
+ sp_document_done (SP_OBJECT_DOCUMENT (spat->src.object), SP_VERB_NONE,
_("Set attribute"));
-
+
} else if (spat->src.repr) {
-
- if (!sp_repr_set_attr (spat->src.repr,
- spat->attributes[i], text))
+
+ if (!sp_repr_set_attr (spat->src.repr,
+ spat->attributes[i], text))
{
/* Cannot set attribute */
text = spat->src.repr->attribute(spat->attributes[i]);
- gtk_entry_set_text ( GTK_ENTRY (spat->entries[i]),
+ gtk_entry_set_text ( GTK_ENTRY (spat->entries[i]),
text ? text : (const gchar *) "" );
}
/* TODO: Warning! Undo will not be flushed in given case */
diff --git a/src/dialogs/xml-tree.cpp b/src/dialogs/xml-tree.cpp
index dd5371460..6da0096e2 100644
--- a/src/dialogs/xml-tree.cpp
+++ b/src/dialogs/xml-tree.cpp
@@ -220,7 +220,7 @@ void sp_xml_tree_dialog()
w = prefs_get_int_attribute(prefs_path, "w", 0);
h = prefs_get_int_attribute(prefs_path, "h", 0);
}
-
+
// if (x<0) x=0;
// if (y<0) y=0;
@@ -628,7 +628,7 @@ void sp_xml_tree_dialog()
} // end of sp_xml_tree_dialog()
-static gboolean sp_xml_tree_key_press(GtkWidget *widget, GdkEventKey *event)
+static gboolean sp_xml_tree_key_press(GtkWidget */*widget*/, GdkEventKey *event)
{
unsigned int shortcut = get_group0_keyval(event) |
@@ -649,9 +649,9 @@ static gboolean sp_xml_tree_key_press(GtkWidget *widget, GdkEventKey *event)
}
-static void sp_xmltree_desktop_change(Inkscape::Application *inkscape,
+static void sp_xmltree_desktop_change(Inkscape::Application */*inkscape*/,
SPDesktop *desktop,
- GtkWidget *dialog )
+ GtkWidget */*dialog*/ )
{
if (!desktop) {
return;
@@ -828,8 +828,8 @@ void set_dt_select(Inkscape::XML::Node *repr)
void on_tree_select_row(GtkCTree *tree,
GtkCTreeNode *node,
- gint column,
- gpointer data)
+ gint /*column*/,
+ gpointer /*data*/)
{
if (blocked) {
return;
@@ -858,8 +858,8 @@ void on_tree_select_row(GtkCTree *tree,
void on_tree_unselect_row(GtkCTree *tree,
GtkCTreeNode *node,
- gint column,
- gpointer data)
+ gint /*column*/,
+ gpointer /*data*/)
{
if (blocked) {
return;
@@ -878,11 +878,11 @@ void on_tree_unselect_row(GtkCTree *tree,
-void after_tree_move(GtkCTree *tree,
+void after_tree_move(GtkCTree */*tree*/,
GtkCTreeNode *node,
GtkCTreeNode *new_parent,
GtkCTreeNode *new_sibling,
- gpointer data)
+ gpointer /*data*/)
{
if (GTK_CTREE_ROW(node)->parent == new_parent &&
GTK_CTREE_ROW(node)->sibling == new_sibling)
@@ -895,7 +895,7 @@ void after_tree_move(GtkCTree *tree,
}
-static void on_destroy(GtkObject *object, gpointer data)
+static void on_destroy(GtkObject */*object*/, gpointer /*data*/)
{
set_tree_desktop(NULL);
gtk_object_destroy(GTK_OBJECT(tooltips));
@@ -916,7 +916,7 @@ static void on_destroy(GtkObject *object, gpointer data)
-static gboolean on_delete(GtkObject *object, GdkEvent *event, gpointer data)
+static gboolean on_delete(GtkObject */*object*/, GdkEvent */*event*/, gpointer /*data*/)
{
gtk_window_get_position((GtkWindow *) dlg, &x, &y);
gtk_window_get_size((GtkWindow *) dlg, &w, &h);
@@ -933,7 +933,7 @@ static gboolean on_delete(GtkObject *object, GdkEvent *event, gpointer data)
}
-static void _set_status_message(Inkscape::MessageType type, const gchar *message, GtkWidget *dialog)
+static void _set_status_message(Inkscape::MessageType /*type*/, const gchar *message, GtkWidget */*dialog*/)
{
if (status) {
gtk_label_set_markup(GTK_LABEL(status), message ? message : "");
@@ -941,9 +941,9 @@ static void _set_status_message(Inkscape::MessageType type, const gchar *message
}
-void on_tree_select_row_enable(GtkCTree *tree,
- GtkCTreeNode *node,
- gint column,
+void on_tree_select_row_enable(GtkCTree */*tree*/,
+ GtkCTreeNode */*node*/,
+ gint /*column*/,
gpointer data)
{
gtk_widget_set_sensitive(GTK_WIDGET(data), TRUE);
@@ -953,7 +953,7 @@ void on_tree_select_row_enable(GtkCTree *tree,
void on_tree_select_row_enable_if_element(GtkCTree *tree,
GtkCTreeNode *node,
- gint column,
+ gint /*column*/,
gpointer data )
{
Inkscape::XML::Node *repr = sp_xmlview_tree_node_get_repr(SP_XMLVIEW_TREE(tree), node);
@@ -968,7 +968,7 @@ void on_tree_select_row_enable_if_element(GtkCTree *tree,
void on_tree_select_row_show_if_element(GtkCTree *tree, GtkCTreeNode *node,
- gint column, gpointer data)
+ gint /*column*/, gpointer data)
{
Inkscape::XML::Node *repr = sp_xmlview_tree_node_get_repr(SP_XMLVIEW_TREE(tree), node);
@@ -982,7 +982,7 @@ void on_tree_select_row_show_if_element(GtkCTree *tree, GtkCTreeNode *node,
void on_tree_select_row_show_if_text(GtkCTree *tree, GtkCTreeNode *node,
- gint column, gpointer data)
+ gint /*column*/, gpointer data)
{
Inkscape::XML::Node *repr = sp_xmlview_tree_node_get_repr(SP_XMLVIEW_TREE(tree), node);
@@ -1021,32 +1021,32 @@ gboolean xml_tree_node_mutable(GtkCTreeNode *node)
}
-void on_tree_select_row_enable_if_mutable(GtkCTree *tree, GtkCTreeNode *node,
- gint column, gpointer data)
+void on_tree_select_row_enable_if_mutable(GtkCTree */*tree*/, GtkCTreeNode *node,
+ gint /*column*/, gpointer data)
{
gtk_widget_set_sensitive(GTK_WIDGET(data), xml_tree_node_mutable(node));
}
-void on_tree_unselect_row_disable(GtkCTree *tree, GtkCTreeNode *node,
- gint column, gpointer data)
+void on_tree_unselect_row_disable(GtkCTree */*tree*/, GtkCTreeNode */*node*/,
+ gint /*column*/, gpointer data)
{
gtk_widget_set_sensitive(GTK_WIDGET(data), FALSE);
}
-void on_tree_unselect_row_hide(GtkCTree *tree, GtkCTreeNode *node,
- gint column, gpointer data)
+void on_tree_unselect_row_hide(GtkCTree */*tree*/, GtkCTreeNode */*node*/,
+ gint /*column*/, gpointer data)
{
gtk_widget_hide(GTK_WIDGET(data));
}
-void on_tree_unselect_row_clear_text(GtkCTree *tree, GtkCTreeNode *node,
- gint column, gpointer data)
+void on_tree_unselect_row_clear_text(GtkCTree */*tree*/, GtkCTreeNode */*node*/,
+ gint /*column*/, gpointer data)
{
if (GTK_IS_EDITABLE(data)) {
gtk_editable_delete_text(GTK_EDITABLE(data), 0, -1);
@@ -1058,8 +1058,8 @@ void on_tree_unselect_row_clear_text(GtkCTree *tree, GtkCTreeNode *node,
}
-void on_attr_select_row(GtkCList *list, gint row, gint column,
- GdkEventButton *event, gpointer data)
+void on_attr_select_row(GtkCList *list, gint row, gint /*column*/,
+ GdkEventButton */*event*/, gpointer /*data*/)
{
selected_attr = sp_xmlview_attr_list_get_row_key(list, row);
gtk_window_set_focus(GTK_WINDOW(dlg), GTK_WIDGET(attr_value));
@@ -1068,15 +1068,15 @@ void on_attr_select_row(GtkCList *list, gint row, gint column,
}
-void on_attr_unselect_row(GtkCList *list, gint row, gint column,
- GdkEventButton *event, gpointer data)
+void on_attr_unselect_row(GtkCList */*list*/, gint /*row*/, gint /*column*/,
+ GdkEventButton */*event*/, gpointer /*data*/)
{
selected_attr = 0;
attr_reset_context(selected_attr);
}
-void on_attr_row_changed(GtkCList *list, gint row, gpointer data)
+void on_attr_row_changed(GtkCList *list, gint row, gpointer /*data*/)
{
gint attr = sp_xmlview_attr_list_get_row_key(list, row);
@@ -1115,7 +1115,7 @@ void on_attr_row_changed(GtkCList *list, gint row, gpointer data)
void on_attr_select_row_set_name_content(GtkCList *list, gint row,
- gint column, GdkEventButton *event,
+ gint /*column*/, GdkEventButton */*event*/,
gpointer data)
{
GtkEditable *editable = GTK_EDITABLE(data);
@@ -1127,8 +1127,8 @@ void on_attr_select_row_set_name_content(GtkCList *list, gint row,
-void on_attr_select_row_set_value_content(GtkCList *list, gint row, gint column,
- GdkEventButton *event,
+void on_attr_select_row_set_value_content(GtkCList *list, gint row, gint /*column*/,
+ GdkEventButton */*event*/,
gpointer data)
{
GtkTextBuffer *tb = gtk_text_view_get_buffer(GTK_TEXT_VIEW(data));
@@ -1142,7 +1142,7 @@ void on_attr_select_row_set_value_content(GtkCList *list, gint row, gint column,
void on_tree_select_row_enable_if_indentable(GtkCTree *tree, GtkCTreeNode *node,
- gint column, gpointer data)
+ gint /*column*/, gpointer data)
{
gboolean indentable = FALSE;
@@ -1172,7 +1172,7 @@ void on_tree_select_row_enable_if_indentable(GtkCTree *tree, GtkCTreeNode *node,
void on_tree_select_row_enable_if_not_first_child(GtkCTree *tree,
GtkCTreeNode *node,
- gint column,
+ gint /*column*/,
gpointer data)
{
Inkscape::XML::Node *repr = sp_xmlview_tree_node_get_repr(SP_XMLVIEW_TREE(tree), node);
@@ -1189,7 +1189,7 @@ void on_tree_select_row_enable_if_not_first_child(GtkCTree *tree,
void on_tree_select_row_enable_if_not_last_child(GtkCTree *tree,
GtkCTreeNode *node,
- gint column, gpointer data)
+ gint /*column*/, gpointer data)
{
Inkscape::XML::Node *repr = sp_xmlview_tree_node_get_repr(SP_XMLVIEW_TREE(tree), node);
@@ -1203,9 +1203,9 @@ void on_tree_select_row_enable_if_not_last_child(GtkCTree *tree,
-void on_tree_select_row_enable_if_has_grandparent(GtkCTree *tree,
+void on_tree_select_row_enable_if_has_grandparent(GtkCTree */*tree*/,
GtkCTreeNode *node,
- gint column, gpointer data)
+ gint /*column*/, gpointer data)
{
GtkCTreeNode *parent = GTK_CTREE_ROW(node)->parent;
@@ -1223,24 +1223,24 @@ void on_tree_select_row_enable_if_has_grandparent(GtkCTree *tree,
-void on_attr_select_row_enable(GtkCList *list, gint row, gint column,
- GdkEventButton *event, gpointer data)
+void on_attr_select_row_enable(GtkCList */*list*/, gint /*row*/, gint /*column*/,
+ GdkEventButton */*event*/, gpointer data)
{
gtk_widget_set_sensitive(GTK_WIDGET(data), TRUE);
}
-void on_attr_unselect_row_disable(GtkCList *list, gint row, gint column,
- GdkEventButton *event, gpointer data)
+void on_attr_unselect_row_disable(GtkCList */*list*/, gint /*row*/, gint /*column*/,
+ GdkEventButton */*event*/, gpointer data)
{
gtk_widget_set_sensitive(GTK_WIDGET(data), FALSE);
}
-void on_attr_unselect_row_clear_text(GtkCList *list, gint row, gint column,
- GdkEventButton *event, gpointer data)
+void on_attr_unselect_row_clear_text(GtkCList */*list*/, gint /*row*/, gint /*column*/,
+ GdkEventButton */*event*/, gpointer data)
{
if (GTK_IS_EDITABLE(data)) {
gtk_editable_delete_text(GTK_EDITABLE(data), 0, -1);
@@ -1270,7 +1270,7 @@ void on_editable_changed_enable_if_valid_xml_name(GtkEditable *editable,
-void on_desktop_selection_changed(Inkscape::Selection *selection)
+void on_desktop_selection_changed(Inkscape::Selection */*selection*/)
{
if (!blocked++) {
set_tree_select(get_dt_select());
@@ -1287,7 +1287,7 @@ static void on_document_replaced(SPDesktop *dt, SPDocument *doc)
set_tree_document(doc);
}
-void on_document_uri_set(gchar const *uri, SPDocument *document)
+void on_document_uri_set(gchar const */*uri*/, SPDocument *document)
{
gchar title[500];
sp_ui_dialog_title_string(Inkscape::Verb::get(SP_VERB_DIALOG_XML_EDITOR), title);
@@ -1298,7 +1298,7 @@ void on_document_uri_set(gchar const *uri, SPDocument *document)
-void on_clicked_get_editable_text(GtkWidget *widget, gpointer data)
+void on_clicked_get_editable_text(GtkWidget */*widget*/, gpointer data)
{
EditableDest *dest = (EditableDest *) data;
dest->text = gtk_editable_get_chars(dest->editable, 0, -1);
@@ -1306,7 +1306,7 @@ void on_clicked_get_editable_text(GtkWidget *widget, gpointer data)
-void cmd_new_element_node(GtkObject *object, gpointer data)
+void cmd_new_element_node(GtkObject */*object*/, gpointer /*data*/)
{
EditableDest name;
GtkWidget *window, *create, *cancel, *vbox, *entry, *bbox, *sep;
@@ -1384,7 +1384,7 @@ void cmd_new_element_node(GtkObject *object, gpointer data)
-void cmd_new_text_node(GtkObject *object, gpointer data)
+void cmd_new_text_node(GtkObject */*object*/, gpointer /*data*/)
{
g_assert(selected_repr != NULL);
@@ -1402,7 +1402,7 @@ void cmd_new_text_node(GtkObject *object, gpointer data)
}
-void cmd_duplicate_node(GtkObject *object, gpointer data)
+void cmd_duplicate_node(GtkObject */*object*/, gpointer /*data*/)
{
g_assert(selected_repr != NULL);
@@ -1422,7 +1422,7 @@ void cmd_duplicate_node(GtkObject *object, gpointer data)
-void cmd_delete_node(GtkObject *object, gpointer data)
+void cmd_delete_node(GtkObject */*object*/, gpointer /*data*/)
{
g_assert(selected_repr != NULL);
sp_repr_unparent(selected_repr);
@@ -1433,7 +1433,7 @@ void cmd_delete_node(GtkObject *object, gpointer data)
-void cmd_delete_attr(GtkObject *object, gpointer data)
+void cmd_delete_attr(GtkObject */*object*/, gpointer /*data*/)
{
g_assert(selected_repr != NULL);
g_assert(selected_attr != 0);
@@ -1445,13 +1445,13 @@ void cmd_delete_attr(GtkObject *object, gpointer data)
updated->updateRepr();
}
- sp_document_done(current_document, SP_VERB_DIALOG_XML_EDITOR,
+ sp_document_done(current_document, SP_VERB_DIALOG_XML_EDITOR,
_("Delete attribute"));
}
-void cmd_set_attr(GtkObject *object, gpointer data)
+void cmd_set_attr(GtkObject */*object*/, gpointer /*data*/)
{
g_assert(selected_repr != NULL);
@@ -1491,7 +1491,7 @@ void cmd_set_attr(GtkObject *object, gpointer data)
-void cmd_raise_node(GtkObject *object, gpointer data)
+void cmd_raise_node(GtkObject */*object*/, gpointer /*data*/)
{
g_assert(selected_repr != NULL);
@@ -1508,7 +1508,7 @@ void cmd_raise_node(GtkObject *object, gpointer data)
parent->changeOrder(selected_repr, ref);
- sp_document_done(current_document, SP_VERB_DIALOG_XML_EDITOR,
+ sp_document_done(current_document, SP_VERB_DIALOG_XML_EDITOR,
_("Raise node"));
set_tree_select(selected_repr);
@@ -1517,7 +1517,7 @@ void cmd_raise_node(GtkObject *object, gpointer data)
-void cmd_lower_node(GtkObject *object, gpointer data)
+void cmd_lower_node(GtkObject */*object*/, gpointer /*data*/)
{
g_assert(selected_repr != NULL);
g_return_if_fail(selected_repr->next() != NULL);
@@ -1532,7 +1532,7 @@ void cmd_lower_node(GtkObject *object, gpointer data)
set_dt_select(selected_repr);
}
-void cmd_indent_node(GtkObject *object, gpointer data)
+void cmd_indent_node(GtkObject */*object*/, gpointer /*data*/)
{
Inkscape::XML::Node *repr = selected_repr;
g_assert(repr != NULL);
@@ -1555,7 +1555,7 @@ void cmd_indent_node(GtkObject *object, gpointer data)
parent->removeChild(repr);
prev->addChild(repr, ref);
- sp_document_done(current_document, SP_VERB_DIALOG_XML_EDITOR,
+ sp_document_done(current_document, SP_VERB_DIALOG_XML_EDITOR,
_("Indent node"));
set_tree_select(repr);
set_dt_select(repr);
@@ -1564,7 +1564,7 @@ void cmd_indent_node(GtkObject *object, gpointer data)
-void cmd_unindent_node(GtkObject *object, gpointer data)
+void cmd_unindent_node(GtkObject */*object*/, gpointer /*data*/)
{
Inkscape::XML::Node *repr = selected_repr;
g_assert(repr != NULL);
@@ -1576,7 +1576,7 @@ void cmd_unindent_node(GtkObject *object, gpointer data)
parent->removeChild(repr);
grandparent->addChild(repr, parent);
- sp_document_done(current_document, SP_VERB_DIALOG_XML_EDITOR,
+ sp_document_done(current_document, SP_VERB_DIALOG_XML_EDITOR,
_("Unindent node"));
set_tree_select(repr);
set_dt_select(repr);
diff --git a/src/display/nr-filter-colormatrix.cpp b/src/display/nr-filter-colormatrix.cpp
index e69e753e8..e5a3ca33f 100644
--- a/src/display/nr-filter-colormatrix.cpp
+++ b/src/display/nr-filter-colormatrix.cpp
@@ -27,7 +27,7 @@ FilterPrimitive * FilterColorMatrix::create() {
FilterColorMatrix::~FilterColorMatrix()
{}
-int FilterColorMatrix::render(FilterSlot &slot, FilterUnits const &units) {
+int FilterColorMatrix::render(FilterSlot &slot, FilterUnits const &/*units*/) {
NRPixBlock *in = slot.get(_input);
NRPixBlock *out = new NRPixBlock;
@@ -43,12 +43,12 @@ int FilterColorMatrix::render(FilterSlot &slot, FilterUnits const &units) {
x0=in->area.x0;
y0=in->area.y0;
x1=in->area.x1;
- y1=in->area.y1;
+ y1=in->area.y1;
switch(type){
case COLORMATRIX_MATRIX:
if (values.size()!=20) {
- g_warning("ColorMatrix: values parameter error. Wrong size: %i.", values.size());
+ g_warning("ColorMatrix: values parameter error. Wrong size: %i.", static_cast<int>(values.size()));
return -1;
}
for (x=x0;x<x1;x++){
@@ -92,7 +92,7 @@ int FilterColorMatrix::render(FilterSlot &slot, FilterUnits const &units) {
a20 = 0.213 + coshue*(-0.213) + sinhue*(-0.787);
a21 = 0.715 + coshue*(-0.715) + sinhue*( 0.715);
a22 = 0.072 + coshue*( 0.928) + sinhue*( 0.072);
-
+
for (x=x0;x<x1;x++){
for (y=y0;y<y1;y++){
i = ((x-x0) + (x1-x0)*(y-y0))*4;
@@ -100,7 +100,7 @@ int FilterColorMatrix::render(FilterSlot &slot, FilterUnits const &units) {
g = in_data[i+1];
b = in_data[i+2];
a = in_data[i+3];
-
+
out_data[i] = CLAMP_D_TO_U8( r*a00 + g*a01 + b*a02 );
out_data[i+1] = CLAMP_D_TO_U8( r*a10 + g*a11 + b*a12 );
out_data[i+2] = CLAMP_D_TO_U8( r*a20 + g*a21 + b*a22 );
@@ -130,7 +130,7 @@ int FilterColorMatrix::render(FilterSlot &slot, FilterUnits const &units) {
return 0;
}
-void FilterColorMatrix::area_enlarge(NRRectL &area, Matrix const &trans)
+void FilterColorMatrix::area_enlarge(NRRectL &/*area*/, Matrix const &/*trans*/)
{
}
diff --git a/src/display/nr-filter-component-transfer.cpp b/src/display/nr-filter-component-transfer.cpp
index a190cecde..270e2296c 100644
--- a/src/display/nr-filter-component-transfer.cpp
+++ b/src/display/nr-filter-component-transfer.cpp
@@ -26,7 +26,7 @@ FilterPrimitive * FilterComponentTransfer::create() {
FilterComponentTransfer::~FilterComponentTransfer()
{}
-int FilterComponentTransfer::render(FilterSlot &slot, FilterUnits const &units) {
+int FilterComponentTransfer::render(FilterSlot &slot, FilterUnits const &/*units*/) {
NRPixBlock *in = slot.get(_input);
NRPixBlock *out = new NRPixBlock;
@@ -38,13 +38,15 @@ int FilterComponentTransfer::render(FilterSlot &slot, FilterUnits const &units)
unsigned char *out_data = NR_PIXBLOCK_PX(out);
//IMPLEMENT ME!
-
+ (void)in_data;
+ (void)out_data;
+
out->empty = FALSE;
slot.set(_output, out);
return 0;
}
-void FilterComponentTransfer::area_enlarge(NRRectL &area, Matrix const &trans)
+void FilterComponentTransfer::area_enlarge(NRRectL &/*area*/, Matrix const &/*trans*/)
{
}
diff --git a/src/display/nr-filter-composite.cpp b/src/display/nr-filter-composite.cpp
index de7dd7952..8670f61b2 100644
--- a/src/display/nr-filter-composite.cpp
+++ b/src/display/nr-filter-composite.cpp
@@ -98,7 +98,7 @@ FilterPrimitive * FilterComposite::create() {
FilterComposite::~FilterComposite()
{}
-int FilterComposite::render(FilterSlot &slot, FilterUnits const &units) {
+int FilterComposite::render(FilterSlot &slot, FilterUnits const &/*units*/) {
NRPixBlock *in1 = slot.get(_input);
NRPixBlock *in2 = slot.get(_input2);
NRPixBlock *original_in1 = in1;
diff --git a/src/display/nr-filter-convolve-matrix.cpp b/src/display/nr-filter-convolve-matrix.cpp
index e40a201a0..fe28c4b0b 100644
--- a/src/display/nr-filter-convolve-matrix.cpp
+++ b/src/display/nr-filter-convolve-matrix.cpp
@@ -34,7 +34,7 @@ static bool inside_area(int px, int py, int w, int h){
return true;
}
-int FilterConvolveMatrix::render(FilterSlot &slot, FilterUnits const &units) {
+int FilterConvolveMatrix::render(FilterSlot &slot, FilterUnits const &/*units*/) {
NRPixBlock *in = slot.get(_input);
NRPixBlock *out = new NRPixBlock;
@@ -112,13 +112,13 @@ void FilterConvolveMatrix::set_kernelMatrix(std::vector<gdouble> &km) {
void FilterConvolveMatrix::set_edgeMode(FilterConvolveMatrixEdgeMode mode){
edgeMode = mode;
-}
+}
void FilterConvolveMatrix::set_preserveAlpha(bool pa){
preserveAlpha = pa;
}
-void FilterConvolveMatrix::area_enlarge(NRRectL &area, Matrix const &trans)
+void FilterConvolveMatrix::area_enlarge(NRRectL &area, Matrix const &/*trans*/)
{
//Seems to me that since this filter's operation is resolution dependent,
// some spurious pixels may still appear at the borders when low zooming or rotating. Needs a better fix.
diff --git a/src/display/nr-filter-displacement-map.cpp b/src/display/nr-filter-displacement-map.cpp
index 184aa802d..afc2df8e7 100644
--- a/src/display/nr-filter-displacement-map.cpp
+++ b/src/display/nr-filter-displacement-map.cpp
@@ -26,24 +26,24 @@ FilterPrimitive * FilterDisplacementMap::create() {
FilterDisplacementMap::~FilterDisplacementMap()
{}
-int FilterDisplacementMap::render(FilterSlot &slot, FilterUnits const &units) {
+int FilterDisplacementMap::render(FilterSlot &slot, FilterUnits const &/*units*/) {
NRPixBlock *texture = slot.get(_input);
NRPixBlock *map = slot.get(_input2);
-
+
// Bail out if either one of source images is missing
if (!map || !texture) {
g_warning("Missing source image for feDisplacementMap (map=%d texture=%d)", _input, _input2);
return 1;
}
-
+
//TODO: check whether do we really need this check:
if (map->area.x1 <= map->area.x0 || map->area.y1 <= map->area.y0) return 0; //nothing to do!
-
- NRPixBlock *out = new NRPixBlock;
+
+ NRPixBlock *out = new NRPixBlock;
//are these checks really necessary?
if (out_w > map->area.x1 - out_x0) out_w = map->area.x1 - out_x0;
- if (out_h > map->area.y1 - out_y0) out_h = map->area.y1 - out_y0;
+ if (out_h > map->area.y1 - out_y0) out_h = map->area.y1 - out_y0;
if (out_x0 < map->area.x0){
out_x0 = map->area.x0;
out_w -= (map->area.x0 - out_x0);
@@ -59,7 +59,7 @@ int FilterDisplacementMap::render(FilterSlot &slot, FilterUnits const &units) {
out->area.y1 = out_y0 + out_h;
nr_pixblock_setup_fast(out, map->mode, out->area.x0, out->area.y0, out->area.x1, out->area.y1, true);
-
+
unsigned char *map_data = NR_PIXBLOCK_PX(map);
unsigned char *texture_data = NR_PIXBLOCK_PX(texture);
unsigned char *out_data = NR_PIXBLOCK_PX(out);
@@ -74,7 +74,7 @@ int FilterDisplacementMap::render(FilterSlot &slot, FilterUnits const &units) {
x+out_x0-map->area.x0 < in_w &&
y+out_y0-map->area.y0 >= 0 &&
y+out_y0-map->area.y0 < in_h){
-
+
coordx = out_x0 - map->area.x0 + x + scale * ( double(map_data[4*((x+out_x0-map->area.x0) + in_w*(y+out_y0-map->area.y0)) + Xchannel])/255 - 0.5);
coordy = out_y0 - map->area.y0 + y + scale * ( double(map_data[4*((x+out_x0-map->area.x0) + in_w*(y+out_y0-map->area.y0)) + Ychannel])/255 - 0.5);
@@ -121,7 +121,7 @@ void FilterDisplacementMap::set_channel_selector(int s, int channel) {
if (s == 1) Ychannel = channel;
}
-void FilterDisplacementMap::area_enlarge(NRRectL &area, Matrix const &trans)
+void FilterDisplacementMap::area_enlarge(NRRectL &area, Matrix const &/*trans*/)
{
out_x0 = area.x0;
out_y0 = area.y0;
diff --git a/src/display/nr-filter-flood.cpp b/src/display/nr-filter-flood.cpp
index fc03e564f..55576842b 100644
--- a/src/display/nr-filter-flood.cpp
+++ b/src/display/nr-filter-flood.cpp
@@ -26,7 +26,7 @@ FilterPrimitive * FilterFlood::create() {
FilterFlood::~FilterFlood()
{}
-int FilterFlood::render(FilterSlot &slot, FilterUnits const &units) {
+int FilterFlood::render(FilterSlot &slot, FilterUnits const &/*units*/) {
NRPixBlock *in = slot.get(_input);
NRPixBlock *out = new NRPixBlock;
@@ -38,13 +38,15 @@ int FilterFlood::render(FilterSlot &slot, FilterUnits const &units) {
unsigned char *out_data = NR_PIXBLOCK_PX(out);
//IMPLEMENT ME!
-
+ (void)in_data;
+ (void)out_data;
+
out->empty = FALSE;
slot.set(_output, out);
return 0;
}
-void FilterFlood::area_enlarge(NRRectL &area, Matrix const &trans)
+void FilterFlood::area_enlarge(NRRectL &/*area*/, Matrix const &/*trans*/)
{
}
diff --git a/src/display/nr-filter-image.cpp b/src/display/nr-filter-image.cpp
index d96d2013b..312e85404 100644
--- a/src/display/nr-filter-image.cpp
+++ b/src/display/nr-filter-image.cpp
@@ -31,9 +31,9 @@ FilterImage::~FilterImage()
if (image_pixbuf) g_free(image_pixbuf);
}
-int FilterImage::render(FilterSlot &slot, FilterUnits const &units) {
+int FilterImage::render(FilterSlot &slot, FilterUnits const &/*units*/) {
if (!feImageHref) return 0;
-
+
if (!image_pixbuf){
if ( (image = Gdk::Pixbuf::create_from_file(feImageHref)) < 0 ) return 0;
width = image->get_width();
@@ -49,7 +49,7 @@ int FilterImage::render(FilterSlot &slot, FilterUnits const &units) {
int x1 = in->area.x1, y1 = in->area.y1;
int bbox_x0 = (int) slot.get_arenaitem()->bbox.x0;
int bbox_y0 = (int) slot.get_arenaitem()->bbox.y0;
-
+
nr_pixblock_setup_fast(out, in->mode, x0, y0, x1, y1, true);
w = x1 - x0;
@@ -92,7 +92,7 @@ void FilterImage::set_region(SVGLength x, SVGLength y, SVGLength width, SVGLengt
FilterTraits FilterImage::get_input_traits() {
return TRAIT_PARALLER;
}
-
+
} /* namespace NR */
/*
diff --git a/src/display/nr-filter-merge.cpp b/src/display/nr-filter-merge.cpp
index 1e95d7cf1..ed060b649 100644
--- a/src/display/nr-filter-merge.cpp
+++ b/src/display/nr-filter-merge.cpp
@@ -46,7 +46,7 @@ FilterPrimitive * FilterMerge::create() {
FilterMerge::~FilterMerge()
{}
-int FilterMerge::render(FilterSlot &slot, FilterUnits const &units) {
+int FilterMerge::render(FilterSlot &slot, FilterUnits const &/*units*/) {
NRPixBlock *in[_input_image.size()];
NRPixBlock *original_in[_input_image.size()];
@@ -117,10 +117,10 @@ void FilterMerge::set_input(int slot) {
void FilterMerge::set_input(int input, int slot) {
if (input < 0) return;
- if (_input_image.size() > input) {
+ if (static_cast<int>(_input_image.size()) > input) {
_input_image[input] = slot;
} else {
- for (unsigned int i = _input_image.size() ; i < input ; i++) {
+ for (int i = static_cast<int>(_input_image.size()) ; i < input ; i++) {
_input_image.push_back(NR_FILTER_SLOT_NOT_SET);
}
_input_image.push_back(slot);
diff --git a/src/display/nr-filter-morphology.cpp b/src/display/nr-filter-morphology.cpp
index 20dc95bfa..abc529aad 100644
--- a/src/display/nr-filter-morphology.cpp
+++ b/src/display/nr-filter-morphology.cpp
@@ -25,19 +25,19 @@ FilterPrimitive * FilterMorphology::create() {
FilterMorphology::~FilterMorphology()
{}
-int FilterMorphology::render(FilterSlot &slot, FilterUnits const &units) {
+int FilterMorphology::render(FilterSlot &slot, FilterUnits const &/*units*/) {
NRPixBlock *in = slot.get(_input);
NRPixBlock *out = new NRPixBlock;
int x0=in->area.x0;
int y0=in->area.y0;
int x1=in->area.x1;
- int y1=in->area.y1;
+ int y1=in->area.y1;
int w=x1-x0, h=y1-y0;
int x,y,i,j;
int rmax,gmax,bmax,amax;
int rmin,gmin,bmin,amin;
-
+
nr_pixblock_setup_fast(out, in->mode, x0, y0, x1, y1, true);
unsigned char *in_data = NR_PIXBLOCK_PX(in);
@@ -55,11 +55,11 @@ int FilterMorphology::render(FilterSlot &slot, FilterUnits const &units) {
if(in_data[4*(i + w*j)+1]>gmax) gmax = in_data[4*(i + w*j)+1];
if(in_data[4*(i + w*j)+2]>bmax) bmax = in_data[4*(i + w*j)+2];
if(in_data[4*(i + w*j)+3]>amax) amax = in_data[4*(i + w*j)+3];
-
+
if(in_data[4*(i + w*j)]<rmin) rmin = in_data[4*(i + w*j)];
if(in_data[4*(i + w*j)+1]<gmin) gmin = in_data[4*(i + w*j)+1];
if(in_data[4*(i + w*j)+2]<bmin) bmin = in_data[4*(i + w*j)+2];
- if(in_data[4*(i + w*j)+3]<amin) amin = in_data[4*(i + w*j)+3];
+ if(in_data[4*(i + w*j)+3]<amin) amin = in_data[4*(i + w*j)+3];
}
}
if (Operator==MORPHOLOGY_OPERATOR_DILATE){
@@ -75,18 +75,18 @@ int FilterMorphology::render(FilterSlot &slot, FilterUnits const &units) {
}
}
}
-
+
out->empty = FALSE;
slot.set(_output, out);
return 0;
}
-void FilterMorphology::area_enlarge(NRRectL &area, Matrix const &trans)
+void FilterMorphology::area_enlarge(NRRectL &area, Matrix const &/*trans*/)
{
area.x0-=xradius;
area.x1+=xradius;
area.y0-=yradius;
- area.y1+=yradius;
+ area.y1+=yradius;
}
void FilterMorphology::set_operator(FilterMorphologyOperator &o){
diff --git a/src/display/nr-filter-primitive.cpp b/src/display/nr-filter-primitive.cpp
index 6e7e9e6ab..32467e3de 100644
--- a/src/display/nr-filter-primitive.cpp
+++ b/src/display/nr-filter-primitive.cpp
@@ -36,7 +36,7 @@ FilterPrimitive::~FilterPrimitive()
// Nothing to do here
}
-void FilterPrimitive::area_enlarge(NRRectL &area, Matrix const &m)
+void FilterPrimitive::area_enlarge(NRRectL &/*area*/, Matrix const &/*m*/)
{
// This doesn't need to do anything by default
}
diff --git a/src/display/nr-filter-specularlighting.cpp b/src/display/nr-filter-specularlighting.cpp
index 7f24f3ec2..3f459f164 100644
--- a/src/display/nr-filter-specularlighting.cpp
+++ b/src/display/nr-filter-specularlighting.cpp
@@ -29,7 +29,7 @@
namespace NR {
-FilterSpecularLighting::FilterSpecularLighting()
+FilterSpecularLighting::FilterSpecularLighting()
{
light_type = NO_LIGHT;
specularConstant = 1;
@@ -47,7 +47,7 @@ FilterSpecularLighting::~FilterSpecularLighting()
//Investigating Phong Lighting model we should not take N.H but
//R.E which equals to 2*N.H^2 - 1
-//replace the second line by
+//replace the second line by
//gdouble scal = scalar_product((N), (H)); scal = 2 * scal * scal - 1;
//to get the expected formula
#define COMPUTE_INTER(inter, H, N, ks, speculaExponent) \
@@ -64,7 +64,7 @@ int FilterSpecularLighting::render(FilterSlot &slot, FilterUnits const &units) {
NRPixBlock *out = new NRPixBlock;
//Fvector *L = NULL; //vector to the light
-
+
int w = in->area.x1 - in->area.x0;
int h = in->area.y1 - in->area.y0;
int x0 = in->area.x0;
@@ -80,7 +80,7 @@ int FilterSpecularLighting::render(FilterSlot &slot, FilterUnits const &units) {
gdouble ks = specularConstant; //diffuse lighting constant
Fvector L, N, LC, H;
gdouble inter;
-
+
nr_pixblock_setup_fast(out, in->mode,
in->area.x0, in->area.y0, in->area.x1, in->area.y1,
true);
@@ -88,7 +88,7 @@ int FilterSpecularLighting::render(FilterSlot &slot, FilterUnits const &units) {
unsigned char *data_o = NR_PIXBLOCK_PX (out);
//No light, nothing to do
switch (light_type) {
- case DISTANT_LIGHT:
+ case DISTANT_LIGHT:
//the light vector is constant
{
DistantLight *dl = new DistantLight(light.distant, lighting_color);
@@ -126,7 +126,7 @@ int FilterSpecularLighting::render(FilterSlot &slot, FilterUnits const &units) {
ss * (double) data_i[4*i+3]/ 255);
normalized_sum(H, L, EYE_VECTOR);
COMPUTE_INTER(inter, N, H, ks, specularExponent);
-
+
data_o[j++] = CLAMP_D_TO_U8(inter * LC[LIGHT_RED]);
data_o[j++] = CLAMP_D_TO_U8(inter * LC[LIGHT_GREEN]);
data_o[j++] = CLAMP_D_TO_U8(inter * LC[LIGHT_BLUE]);
@@ -153,7 +153,7 @@ int FilterSpecularLighting::render(FilterSlot &slot, FilterUnits const &units) {
sl->light_components(LC, L);
normalized_sum(H, L, EYE_VECTOR);
COMPUTE_INTER(inter, N, H, ks, specularExponent);
-
+
data_o[j++] = CLAMP_D_TO_U8(inter * LC[LIGHT_RED]);
data_o[j++] = CLAMP_D_TO_U8(inter * LC[LIGHT_GREEN]);
data_o[j++] = CLAMP_D_TO_U8(inter * LC[LIGHT_BLUE]);
@@ -172,7 +172,7 @@ int FilterSpecularLighting::render(FilterSlot &slot, FilterUnits const &units) {
out->empty = false;
}
}
-
+
//finishing
slot.set(_output, out);
nr_pixblock_release(in);
diff --git a/src/display/nr-filter-tile.cpp b/src/display/nr-filter-tile.cpp
index 01453da39..b058db2bc 100644
--- a/src/display/nr-filter-tile.cpp
+++ b/src/display/nr-filter-tile.cpp
@@ -26,7 +26,7 @@ FilterPrimitive * FilterTile::create() {
FilterTile::~FilterTile()
{}
-int FilterTile::render(FilterSlot &slot, FilterUnits const &units) {
+int FilterTile::render(FilterSlot &slot, FilterUnits const &/*units*/) {
NRPixBlock *in = slot.get(_input);
NRPixBlock *out = new NRPixBlock;
@@ -38,13 +38,15 @@ int FilterTile::render(FilterSlot &slot, FilterUnits const &units) {
unsigned char *out_data = NR_PIXBLOCK_PX(out);
//IMPLEMENT ME!
-
+ (void)in_data;
+ (void)out_data;
+
out->empty = FALSE;
slot.set(_output, out);
return 0;
}
-void FilterTile::area_enlarge(NRRectL &area, Matrix const &trans)
+void FilterTile::area_enlarge(NRRectL &/*area*/, Matrix const &/*trans*/)
{
}
diff --git a/src/display/nr-filter-turbulence.cpp b/src/display/nr-filter-turbulence.cpp
index addbbb663..2c5d0ee64 100644
--- a/src/display/nr-filter-turbulence.cpp
+++ b/src/display/nr-filter-turbulence.cpp
@@ -2,13 +2,13 @@
* feTurbulence filter primitive renderer
*
* Authors:
- * Felipe CorrĂȘa da Silva Sanches <felipe.sanches@gmail.com>
+ * Felipe CorrĂȘa da Silva Sanches <felipe.sanches@gmail.com>
*
* Copyright (C) 2007 authors
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
-
+
#include "display/nr-arena-item.h"
#include "display/nr-filter.h"
#include "display/nr-filter-turbulence.h"
@@ -72,8 +72,7 @@ void FilterTurbulence::update_pixbuffer(FilterSlot &slot) {
int bbox_y1 = (int) slot.get_arenaitem()->bbox.y1;
int w = bbox_x1 - bbox_x0;
- int h = bbox_y1 - bbox_y0;
- int x,y;
+ int h = bbox_y1 - bbox_y0;
if (!pix){
pix = new NRPixBlock;
@@ -107,10 +106,10 @@ void FilterTurbulence::update_pixbuffer(FilterSlot &slot) {
updated=true;
}
-int FilterTurbulence::render(FilterSlot &slot, FilterUnits const &units) {
+int FilterTurbulence::render(FilterSlot &slot, FilterUnits const &/*units*/) {
//g_warning("render");
if (!updated) update_pixbuffer(slot);
-
+
NRPixBlock *in = slot.get(_input);
NRPixBlock *out = new NRPixBlock;
int x,y;
@@ -123,7 +122,7 @@ int FilterTurbulence::render(FilterSlot &slot, FilterUnits const &units) {
int bbox_y0 = (int) slot.get_arenaitem()->bbox.y0;
int bbox_x1 = (int) slot.get_arenaitem()->bbox.x1;
int bbox_w = bbox_x1 - bbox_x0;
-
+
unsigned char *out_data = NR_PIXBLOCK_PX(out);
for (x=x0; x < x1; x++){
for (y=y0; y < y1; y++){
diff --git a/src/dom/uri.cpp b/src/dom/uri.cpp
index e68caf898..13b76c413 100644
--- a/src/dom/uri.cpp
+++ b/src/dom/uri.cpp
@@ -329,6 +329,9 @@ static int find(const std::vector<int> &str, int ch, int startpos)
static int findLast(const std::vector<int> &str, int ch)
{
+ // TODO FIXME BUGBUG
+ // This loop appears to be infinite, so it is probably not being called.
+ // Test for a problem, then fix after it has been observed locking up.
for (unsigned int i = str.size()-1 ; i>=0 ; i--)
{
if (ch == str[i])
diff --git a/src/ege-color-prof-tracker.cpp b/src/ege-color-prof-tracker.cpp
index 7e51db933..900246595 100644
--- a/src/ege-color-prof-tracker.cpp
+++ b/src/ege-color-prof-tracker.cpp
@@ -185,7 +185,7 @@ void ege_color_prof_tracker_class_init( EgeColorProfTrackerClass* klass )
signals[ADDED] = g_signal_new( "added",
G_TYPE_FROM_CLASS(klass),
G_SIGNAL_RUN_FIRST,
- NULL,
+ 0,
NULL, NULL,
gtk_marshal_VOID__INT_INT,
G_TYPE_NONE, 2,
@@ -195,7 +195,7 @@ void ege_color_prof_tracker_class_init( EgeColorProfTrackerClass* klass )
signals[REMOVED] = g_signal_new( "removed",
G_TYPE_FROM_CLASS(klass),
G_SIGNAL_RUN_FIRST,
- NULL,
+ 0,
NULL, NULL,
gtk_marshal_VOID__INT_INT,
G_TYPE_NONE, 2,
@@ -205,7 +205,7 @@ void ege_color_prof_tracker_class_init( EgeColorProfTrackerClass* klass )
signals[MODIFIED] = g_signal_new( "modified",
G_TYPE_FROM_CLASS(klass),
G_SIGNAL_RUN_FIRST,
- NULL,
+ 0,
NULL, NULL,
gtk_marshal_VOID__INT_INT,
G_TYPE_NONE, 2,
diff --git a/src/extension/internal/gdkpixbuf-input.cpp b/src/extension/internal/gdkpixbuf-input.cpp
index b24bda8e9..9f3360bab 100644
--- a/src/extension/internal/gdkpixbuf-input.cpp
+++ b/src/extension/internal/gdkpixbuf-input.cpp
@@ -18,7 +18,7 @@ namespace Extension {
namespace Internal {
SPDocument *
-GdkpixbufInput::open(Inkscape::Extension::Input *mod, char const *uri)
+GdkpixbufInput::open(Inkscape::Extension::Input */*mod*/, char const *uri)
{
SPDocument *doc = sp_document_new(NULL, TRUE, TRUE);
bool saved = sp_document_get_undo_sensitive(doc);
@@ -55,8 +55,8 @@ GdkpixbufInput::open(Inkscape::Extension::Input *mod, char const *uri)
// import as <image>
repr = xml_doc->createElement("svg:image");
// both are the same, as we don't know our base dir here and cannot relativate href (importer will fixupHrefs):
- repr->setAttribute("xlink:href", uri);
- repr->setAttribute("sodipodi:absref", uri);
+ repr->setAttribute("xlink:href", uri);
+ repr->setAttribute("sodipodi:absref", uri);
sp_repr_set_svg_double(repr, "width", width);
sp_repr_set_svg_double(repr, "height", height);
diff --git a/src/sp-object-group.cpp b/src/sp-object-group.cpp
index 5674f44b2..888fe2d8e 100644
--- a/src/sp-object-group.cpp
+++ b/src/sp-object-group.cpp
@@ -66,7 +66,7 @@ sp_objectgroup_class_init (SPObjectGroupClass *klass)
}
static void
-sp_objectgroup_init (SPObjectGroup *objectgroup)
+sp_objectgroup_init (SPObjectGroup */*objectgroup*/)
{
}
diff --git a/src/text-context.cpp b/src/text-context.cpp
index 6ebd6c959..f97bb26ac 100644
--- a/src/text-context.cpp
+++ b/src/text-context.cpp
@@ -504,7 +504,7 @@ sp_text_context_setup_text(SPTextContext *tc)
Inkscape::GC::release(rtext);
text_item->transform = SP_ITEM(ec->desktop->currentRoot())->getRelativeTransform(ec->desktop->currentLayer());
text_item->updateRepr();
- sp_document_done(sp_desktop_document(ec->desktop), SP_VERB_CONTEXT_TEXT,
+ sp_document_done(sp_desktop_document(ec->desktop), SP_VERB_CONTEXT_TEXT,
_("Create text"));
}
@@ -543,7 +543,7 @@ insert_uni_char(SPTextContext *const tc)
tc->text_sel_start = tc->text_sel_end = sp_te_replace(tc->text, tc->text_sel_start, tc->text_sel_end, u);
sp_text_context_update_cursor(tc);
sp_text_context_update_text_selection(tc);
- sp_document_done(sp_desktop_document(tc->desktop), SP_VERB_DIALOG_TRANSFORM,
+ sp_document_done(sp_desktop_document(tc->desktop), SP_VERB_DIALOG_TRANSFORM,
_("Insert Unicode character"));
}
}
@@ -702,7 +702,7 @@ sp_text_context_root_handler(SPEventContext *const event_context, GdkEvent *cons
sp_desktop_apply_style_tool(desktop, SP_OBJECT_REPR(ft), "tools.text", true);
sp_desktop_selection(desktop)->set(ft);
desktop->messageStack()->flash(Inkscape::NORMAL_MESSAGE, _("Flowed text is created."));
- sp_document_done(sp_desktop_document(desktop), SP_VERB_CONTEXT_TEXT,
+ sp_document_done(sp_desktop_document(desktop), SP_VERB_CONTEXT_TEXT,
_("Create flowed text"));
} else {
desktop->messageStack()->flash(Inkscape::ERROR_MESSAGE, _("The frame is <b>too small</b> for the current font size. Flowed text not created."));
@@ -832,7 +832,7 @@ sp_text_context_root_handler(SPEventContext *const event_context, GdkEvent *cons
sp_text_context_update_cursor(tc);
sp_text_context_update_text_selection(tc);
desktop->messageStack()->flash(Inkscape::NORMAL_MESSAGE, _("No-break space"));
- sp_document_done(sp_desktop_document(desktop), SP_VERB_CONTEXT_TEXT,
+ sp_document_done(sp_desktop_document(desktop), SP_VERB_CONTEXT_TEXT,
_("Insert no-break space"));
return TRUE;
}
@@ -869,7 +869,7 @@ sp_text_context_root_handler(SPEventContext *const event_context, GdkEvent *cons
sp_repr_css_set_property(css, "font-weight", "normal");
sp_te_apply_style(tc->text, tc->text_sel_start, tc->text_sel_end, css);
sp_repr_css_attr_unref(css);
- sp_document_done(sp_desktop_document(desktop), SP_VERB_CONTEXT_TEXT,
+ sp_document_done(sp_desktop_document(desktop), SP_VERB_CONTEXT_TEXT,
_("Make bold"));
sp_text_context_update_cursor(tc);
sp_text_context_update_text_selection(tc);
@@ -887,7 +887,7 @@ sp_text_context_root_handler(SPEventContext *const event_context, GdkEvent *cons
sp_repr_css_set_property(css, "font-style", "normal");
sp_te_apply_style(tc->text, tc->text_sel_start, tc->text_sel_end, css);
sp_repr_css_attr_unref(css);
- sp_document_done(sp_desktop_document(desktop), SP_VERB_CONTEXT_TEXT,
+ sp_document_done(sp_desktop_document(desktop), SP_VERB_CONTEXT_TEXT,
_("Make italic"));
sp_text_context_update_cursor(tc);
sp_text_context_update_text_selection(tc);
@@ -916,32 +916,33 @@ sp_text_context_root_handler(SPEventContext *const event_context, GdkEvent *cons
sp_text_context_setup_text(tc);
tc->nascent_object = 0; // we don't need it anymore, having created a real <text>
}
-
+
iterator_pair enter_pair;
bool success = sp_te_delete(tc->text, tc->text_sel_start, tc->text_sel_end, enter_pair);
+ (void)success; // TODO cleanup
tc->text_sel_start = tc->text_sel_end = enter_pair.first;
-
+
tc->text_sel_start = tc->text_sel_end = sp_te_insert_line(tc->text, tc->text_sel_start);
-
+
sp_text_context_update_cursor(tc);
sp_text_context_update_text_selection(tc);
- sp_document_done(sp_desktop_document(desktop), SP_VERB_CONTEXT_TEXT,
+ sp_document_done(sp_desktop_document(desktop), SP_VERB_CONTEXT_TEXT,
_("New line"));
return TRUE;
}
case GDK_BackSpace:
if (tc->text) { // if nascent_object, do nothing, but return TRUE; same for all other delete and move keys
-
+
bool noSelection = false;
-
+
if (tc->text_sel_start == tc->text_sel_end) {
tc->text_sel_start.prevCursorPosition();
noSelection = true;
}
-
+
iterator_pair bspace_pair;
bool success = sp_te_delete(tc->text, tc->text_sel_start, tc->text_sel_end, bspace_pair);
-
+
if (noSelection) {
if (success) {
tc->text_sel_start = tc->text_sel_end = bspace_pair.first;
@@ -956,10 +957,10 @@ sp_text_context_root_handler(SPEventContext *const event_context, GdkEvent *cons
tc->text_sel_end = bspace_pair.second;
}
}
-
+
sp_text_context_update_cursor(tc);
sp_text_context_update_text_selection(tc);
- sp_document_done(sp_desktop_document(desktop), SP_VERB_CONTEXT_TEXT,
+ sp_document_done(sp_desktop_document(desktop), SP_VERB_CONTEXT_TEXT,
_("Backspace"));
}
return TRUE;
@@ -967,15 +968,15 @@ sp_text_context_root_handler(SPEventContext *const event_context, GdkEvent *cons
case GDK_KP_Delete:
if (tc->text) {
bool noSelection = false;
-
+
if (tc->text_sel_start == tc->text_sel_end) {
tc->text_sel_end.nextCursorPosition();
noSelection = true;
}
-
+
iterator_pair del_pair;
bool success = sp_te_delete(tc->text, tc->text_sel_start, tc->text_sel_end, del_pair);
-
+
if (noSelection) {
tc->text_sel_start = tc->text_sel_end = del_pair.first;
} else {
@@ -986,11 +987,11 @@ sp_text_context_root_handler(SPEventContext *const event_context, GdkEvent *cons
tc->text_sel_end = del_pair.second;
}
}
-
-
+
+
sp_text_context_update_cursor(tc);
sp_text_context_update_text_selection(tc);
- sp_document_done(sp_desktop_document(desktop), SP_VERB_CONTEXT_TEXT,
+ sp_document_done(sp_desktop_document(desktop), SP_VERB_CONTEXT_TEXT,
_("Delete"));
}
return TRUE;
@@ -1007,7 +1008,7 @@ sp_text_context_root_handler(SPEventContext *const event_context, GdkEvent *cons
sp_te_adjust_kerning_screen(tc->text, tc->text_sel_start, tc->text_sel_end, desktop, NR::Point(mul*-1, 0));
sp_text_context_update_cursor(tc);
sp_text_context_update_text_selection(tc);
- sp_document_maybe_done(sp_desktop_document(desktop), "kern:left", SP_VERB_CONTEXT_TEXT,
+ sp_document_maybe_done(sp_desktop_document(desktop), "kern:left", SP_VERB_CONTEXT_TEXT,
_("Kern to the left"));
} else {
cursor_movement_operator = MOD__CTRL ? &Inkscape::Text::Layout::iterator::cursorLeftWithControl
@@ -1029,7 +1030,7 @@ sp_text_context_root_handler(SPEventContext *const event_context, GdkEvent *cons
sp_te_adjust_kerning_screen(tc->text, tc->text_sel_start, tc->text_sel_end, desktop, NR::Point(mul*1, 0));
sp_text_context_update_cursor(tc);
sp_text_context_update_text_selection(tc);
- sp_document_maybe_done(sp_desktop_document(desktop), "kern:right", SP_VERB_CONTEXT_TEXT,
+ sp_document_maybe_done(sp_desktop_document(desktop), "kern:right", SP_VERB_CONTEXT_TEXT,
_("Kern to the right"));
} else {
cursor_movement_operator = MOD__CTRL ? &Inkscape::Text::Layout::iterator::cursorRightWithControl
@@ -1051,7 +1052,7 @@ sp_text_context_root_handler(SPEventContext *const event_context, GdkEvent *cons
sp_te_adjust_kerning_screen(tc->text, tc->text_sel_start, tc->text_sel_end, desktop, NR::Point(0, mul*-1));
sp_text_context_update_cursor(tc);
sp_text_context_update_text_selection(tc);
- sp_document_maybe_done(sp_desktop_document(desktop), "kern:up", SP_VERB_CONTEXT_TEXT,
+ sp_document_maybe_done(sp_desktop_document(desktop), "kern:up", SP_VERB_CONTEXT_TEXT,
_("Kern up"));
} else {
@@ -1074,7 +1075,7 @@ sp_text_context_root_handler(SPEventContext *const event_context, GdkEvent *cons
sp_te_adjust_kerning_screen(tc->text, tc->text_sel_start, tc->text_sel_end, desktop, NR::Point(0, mul*1));
sp_text_context_update_cursor(tc);
sp_text_context_update_text_selection(tc);
- sp_document_maybe_done(sp_desktop_document(desktop), "kern:down", SP_VERB_CONTEXT_TEXT,
+ sp_document_maybe_done(sp_desktop_document(desktop), "kern:down", SP_VERB_CONTEXT_TEXT,
_("Kern down"));
} else {
@@ -1130,7 +1131,7 @@ sp_text_context_root_handler(SPEventContext *const event_context, GdkEvent *cons
} else {
sp_te_adjust_rotation(tc->text, tc->text_sel_start, tc->text_sel_end, desktop, -90);
}
- sp_document_maybe_done(sp_desktop_document(desktop), "textrot:ccw", SP_VERB_CONTEXT_TEXT,
+ sp_document_maybe_done(sp_desktop_document(desktop), "textrot:ccw", SP_VERB_CONTEXT_TEXT,
_("Rotate counterclockwise"));
sp_text_context_update_cursor(tc);
sp_text_context_update_text_selection(tc);
@@ -1151,7 +1152,7 @@ sp_text_context_root_handler(SPEventContext *const event_context, GdkEvent *cons
} else {
sp_te_adjust_rotation(tc->text, tc->text_sel_start, tc->text_sel_end, desktop, 90);
}
- sp_document_maybe_done(sp_desktop_document(desktop), "textrot:cw", SP_VERB_CONTEXT_TEXT,
+ sp_document_maybe_done(sp_desktop_document(desktop), "textrot:cw", SP_VERB_CONTEXT_TEXT,
_("Rotate clockwise"));
sp_text_context_update_cursor(tc);
sp_text_context_update_text_selection(tc);
@@ -1168,7 +1169,7 @@ sp_text_context_root_handler(SPEventContext *const event_context, GdkEvent *cons
sp_te_adjust_linespacing_screen(tc->text, tc->text_sel_start, tc->text_sel_end, desktop, -10);
else
sp_te_adjust_linespacing_screen(tc->text, tc->text_sel_start, tc->text_sel_end, desktop, -1);
- sp_document_maybe_done(sp_desktop_document(desktop), "linespacing:dec", SP_VERB_CONTEXT_TEXT,
+ sp_document_maybe_done(sp_desktop_document(desktop), "linespacing:dec", SP_VERB_CONTEXT_TEXT,
_("Contract line spacing"));
} else {
@@ -1176,7 +1177,7 @@ sp_text_context_root_handler(SPEventContext *const event_context, GdkEvent *cons
sp_te_adjust_tspan_letterspacing_screen(tc->text, tc->text_sel_start, tc->text_sel_end, desktop, -10);
else
sp_te_adjust_tspan_letterspacing_screen(tc->text, tc->text_sel_start, tc->text_sel_end, desktop, -1);
- sp_document_maybe_done(sp_desktop_document(desktop), "letterspacing:dec", SP_VERB_CONTEXT_TEXT,
+ sp_document_maybe_done(sp_desktop_document(desktop), "letterspacing:dec", SP_VERB_CONTEXT_TEXT,
_("Contract letter spacing"));
}
@@ -1195,7 +1196,7 @@ sp_text_context_root_handler(SPEventContext *const event_context, GdkEvent *cons
sp_te_adjust_linespacing_screen(tc->text, tc->text_sel_start, tc->text_sel_end, desktop, 10);
else
sp_te_adjust_linespacing_screen(tc->text, tc->text_sel_start, tc->text_sel_end, desktop, 1);
- sp_document_maybe_done(sp_desktop_document(desktop), "linespacing:inc", SP_VERB_CONTEXT_TEXT,
+ sp_document_maybe_done(sp_desktop_document(desktop), "linespacing:inc", SP_VERB_CONTEXT_TEXT,
_("Expand line spacing"));
} else {
@@ -1203,7 +1204,7 @@ sp_text_context_root_handler(SPEventContext *const event_context, GdkEvent *cons
sp_te_adjust_tspan_letterspacing_screen(tc->text, tc->text_sel_start, tc->text_sel_end, desktop, 10);
else
sp_te_adjust_tspan_letterspacing_screen(tc->text, tc->text_sel_start, tc->text_sel_end, desktop, 1);
- sp_document_maybe_done(sp_desktop_document(desktop), "letterspacing:inc", SP_VERB_CONTEXT_TEXT,
+ sp_document_maybe_done(sp_desktop_document(desktop), "letterspacing:inc", SP_VERB_CONTEXT_TEXT,
_("Expand letter spacing"));
}
@@ -1307,7 +1308,7 @@ sp_text_paste_inline(SPEventContext *ec)
tc->text_sel_start = tc->text_sel_end = sp_te_insert_line(tc->text, tc->text_sel_start);
begin = end + 1;
}
- sp_document_done(sp_desktop_document(ec->desktop), SP_VERB_CONTEXT_TEXT,
+ sp_document_done(sp_desktop_document(ec->desktop), SP_VERB_CONTEXT_TEXT,
_("Paste text"));
return true;
@@ -1347,21 +1348,21 @@ bool sp_text_delete_selection(SPEventContext *ec)
if (tc->text_sel_start == tc->text_sel_end)
return false;
-
+
iterator_pair pair;
bool success = sp_te_delete(tc->text, tc->text_sel_start, tc->text_sel_end, pair);
-
-
+
+
if (success) {
tc->text_sel_start = tc->text_sel_end = pair.first;
} else { // nothing deleted
tc->text_sel_start = pair.first;
tc->text_sel_end = pair.second;
}
-
+
sp_text_context_update_cursor(tc);
sp_text_context_update_text_selection(tc);
-
+
return true;
}
@@ -1433,7 +1434,7 @@ sp_text_context_style_set(SPCSSAttr const *css, SPTextContext *tc)
return false; // will get picked up by the parent and applied to the whole text object
sp_te_apply_style(tc->text, tc->text_sel_start, tc->text_sel_end, css);
- sp_document_done(sp_desktop_document(tc->desktop), SP_VERB_CONTEXT_TEXT,
+ sp_document_done(sp_desktop_document(tc->desktop), SP_VERB_CONTEXT_TEXT,
_("Set text style"));
sp_text_context_update_cursor(tc);
sp_text_context_update_text_selection(tc);
@@ -1603,6 +1604,7 @@ sp_text_context_forget_text(SPTextContext *tc)
{
if (! tc->text) return;
SPItem *ti = tc->text;
+ (void)ti;
/* We have to set it to zero,
* or selection changed signal messes everything up */
tc->text = NULL;
@@ -1619,7 +1621,7 @@ sp_text_context_forget_text(SPTextContext *tc)
// the XML editor
if ( text_repr && sp_repr_parent(text_repr) ) {
sp_repr_unparent(text_repr);
- sp_document_done(sp_desktop_document(tc->desktop), SP_VERB_CONTEXT_TEXT,
+ sp_document_done(sp_desktop_document(tc->desktop), SP_VERB_CONTEXT_TEXT,
_("Remove empty text"));
}
}
@@ -1652,7 +1654,7 @@ sptc_commit(GtkIMContext */*imc*/, gchar *string, SPTextContext *tc)
sp_text_context_update_cursor(tc);
sp_text_context_update_text_selection(tc);
- sp_document_done(SP_OBJECT_DOCUMENT(tc->text), SP_VERB_CONTEXT_TEXT,
+ sp_document_done(SP_OBJECT_DOCUMENT(tc->text), SP_VERB_CONTEXT_TEXT,
_("Type text"));
}
diff --git a/src/vanishing-point.cpp b/src/vanishing-point.cpp
index 278198b12..6f72a9621 100644
--- a/src/vanishing-point.cpp
+++ b/src/vanishing-point.cpp
@@ -137,7 +137,7 @@ vp_drag_sel_changed(Inkscape::Selection */*selection*/, gpointer data)
}
static void
-vp_drag_sel_modified (Inkscape::Selection */*selection*/, guint flags, gpointer data)
+vp_drag_sel_modified (Inkscape::Selection */*selection*/, guint /*flags*/, gpointer data)
{
VPDrag *drag = (VPDrag *) data;
/***