diff options
author | David Robillard <d@drobilla.net> | 2020-11-29 11:52:57 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-11-29 11:53:37 +0100 |
commit | 8c3e0c4d90fce56f59aab84f1f62aaf484706ce1 (patch) | |
tree | 06cfb0e27aaa946b2ebb2f911bff49c05e484a56 /src | |
parent | 29d31fd1a61e860c69a5a8b8b32156cea9075ae8 (diff) | |
download | ganv-8c3e0c4d90fce56f59aab84f1f62aaf484706ce1.tar.gz ganv-8c3e0c4d90fce56f59aab84f1f62aaf484706ce1.tar.bz2 ganv-8c3e0c4d90fce56f59aab84f1f62aaf484706ce1.zip |
Fix Wunused-parameter warnings
Diffstat (limited to 'src')
-rw-r--r-- | src/Canvas.cpp | 20 | ||||
-rw-r--r-- | src/Port.cpp | 2 | ||||
-rw-r--r-- | src/edge.c | 5 | ||||
-rw-r--r-- | src/group.c | 4 | ||||
-rw-r--r-- | src/item.c | 11 | ||||
-rw-r--r-- | src/module.c | 4 | ||||
-rw-r--r-- | src/node.c | 11 | ||||
-rw-r--r-- | src/port.c | 4 | ||||
-rw-r--r-- | src/text.c | 5 | ||||
-rw-r--r-- | src/widget.c | 8 |
10 files changed, 62 insertions, 12 deletions
diff --git a/src/Canvas.cpp b/src/Canvas.cpp index 744fe78..4e83507 100644 --- a/src/Canvas.cpp +++ b/src/Canvas.cpp @@ -510,7 +510,7 @@ GanvCanvasImpl::first_edge_to(const GanvNode* head) } static void -select_if_tail_is_selected(GanvEdge* edge, void* data) +select_if_tail_is_selected(GanvEdge* edge, void*) { GanvNode* tail = edge->impl->tail; gboolean selected; @@ -526,7 +526,7 @@ select_if_tail_is_selected(GanvEdge* edge, void* data) } static void -select_if_head_is_selected(GanvEdge* edge, void* data) +select_if_head_is_selected(GanvEdge* edge, void*) { GanvNode* head = edge->impl->head; gboolean selected; @@ -1701,22 +1701,20 @@ GanvCanvasImpl::unselect_ports() namespace Ganv { static gboolean -on_event_after(GanvItem* canvasitem, - GdkEvent* ev, - void* canvas) +on_event_after(GanvItem*, GdkEvent* ev, void* canvas) { return ((Canvas*)canvas)->signal_event.emit(ev); } static void -on_connect(GanvCanvas* canvas, GanvNode* tail, GanvNode* head, void* data) +on_connect(GanvCanvas*, GanvNode* tail, GanvNode* head, void* data) { Canvas* canvasmm = (Canvas*)data; canvasmm->signal_connect.emit(Glib::wrap(tail), Glib::wrap(head)); } static void -on_disconnect(GanvCanvas* canvas, GanvNode* tail, GanvNode* head, void* data) +on_disconnect(GanvCanvas*, GanvNode* tail, GanvNode* head, void* data) { Canvas* canvasmm = (Canvas*)data; canvasmm->signal_disconnect.emit(Glib::wrap(tail), Glib::wrap(head)); @@ -1799,9 +1797,7 @@ enum { }; static gboolean -on_canvas_event(GanvItem* canvasitem, - GdkEvent* ev, - void* impl) +on_canvas_event(GanvItem*, GdkEvent* ev, void* impl) { return ((GanvCanvasImpl*)impl)->on_event(ev); } @@ -2212,7 +2208,7 @@ ganv_canvas_selection_move_finished(GanvCanvas* canvas) } static void -select_if_ends_are_selected(GanvEdge* edge, void* data) +select_if_ends_are_selected(GanvEdge* edge, void*) { if (ganv_node_is_selected(ganv_edge_get_tail(edge)) && ganv_node_is_selected(ganv_edge_get_head(edge))) { @@ -2694,7 +2690,7 @@ ganv_canvas_export_dot(GanvCanvas* canvas, const char* filename) } gboolean -ganv_canvas_supports_sprung_layout(const GanvCanvas* canvas) +ganv_canvas_supports_sprung_layout(const GanvCanvas*) { #ifdef GANV_FDGL return TRUE; diff --git a/src/Port.cpp b/src/Port.cpp index 73b04ce..3506039 100644 --- a/src/Port.cpp +++ b/src/Port.cpp @@ -28,6 +28,8 @@ namespace Ganv { static void on_value_changed(GanvPort* port, double value, void* portmm) { + (void)port; + static_cast<Port*>(portmm)->signal_value_changed.emit(value); } @@ -340,6 +340,11 @@ static void ganv_edge_draw(GanvItem* item, cairo_t* cr, double cx, double cy, double cw, double ch) { + (void)cx; + (void)cy; + (void)cw; + (void)ch; + GanvEdge* edge = GANV_EDGE(item); GanvEdgePrivate* impl = edge->impl; diff --git a/src/group.c b/src/group.c index e09a21f..b60495b 100644 --- a/src/group.c +++ b/src/group.c @@ -50,6 +50,8 @@ static void ganv_group_set_property(GObject* gobject, guint param_id, const GValue* value, GParamSpec* pspec) { + (void)value; + g_return_if_fail(GANV_IS_GROUP(gobject)); switch (param_id) { @@ -63,6 +65,8 @@ static void ganv_group_get_property(GObject* gobject, guint param_id, GValue* value, GParamSpec* pspec) { + (void)value; + g_return_if_fail(GANV_IS_GROUP(gobject)); switch (param_id) { @@ -314,6 +314,8 @@ ganv_item_unmap(GanvItem* item) static void ganv_item_update(GanvItem* item, int flags) { + (void)flags; + GTK_OBJECT_UNSET_FLAGS(item, GANV_ITEM_NEED_UPDATE); GTK_OBJECT_UNSET_FLAGS(item, GANV_ITEM_NEED_VIS); } @@ -322,6 +324,10 @@ ganv_item_update(GanvItem* item, int flags) static double ganv_item_point(GanvItem* item, double x, double y, GanvItem** actual_item) { + (void)item; + (void)x; + (void)y; + *actual_item = NULL; return G_MAXDOUBLE; } @@ -568,6 +574,8 @@ ganv_item_emit_event(GanvItem* item, GdkEvent* event, gint* finished) static void ganv_item_default_bounds(GanvItem* item, double* x1, double* y1, double* x2, double* y2) { + (void)item; + *x1 = *y1 = *x2 = *y2 = 0.0; } @@ -634,6 +642,9 @@ boolean_handled_accumulator(GSignalInvocationHint* ihint, const GValue* handler_return, gpointer dummy) { + (void)ihint; + (void)dummy; + gboolean continue_emission; gboolean signal_handled; diff --git a/src/module.c b/src/module.c index be6cfb8..a33b27c 100644 --- a/src/module.c +++ b/src/module.c @@ -100,6 +100,8 @@ ganv_module_set_property(GObject* object, const GValue* value, GParamSpec* pspec) { + (void)value; + g_return_if_fail(object != NULL); g_return_if_fail(GANV_IS_MODULE(object)); @@ -116,6 +118,8 @@ ganv_module_get_property(GObject* object, GValue* value, GParamSpec* pspec) { + (void)value; + g_return_if_fail(object != NULL); g_return_if_fail(GANV_IS_MODULE(object)); @@ -168,6 +168,13 @@ static void ganv_node_draw(GanvItem* item, cairo_t* cr, double cx, double cy, double cw, double ch) { + (void)item; + (void)cr; + (void)cx; + (void)cy; + (void)cw; + (void)ch; + /* TODO: Label is not drawn here because ports need to draw control rects then the label on top. I can't see a way of solving this since there's no single time parent class draw needs to be called, so perhaps @@ -280,6 +287,8 @@ ganv_node_default_tail_vector(const GanvNode* self, double* dx, double* dy) { + (void)head; + GanvCanvas* canvas = ganv_item_get_canvas(GANV_ITEM(self)); *x = GANV_ITEM(self)->impl->x; @@ -307,6 +316,8 @@ ganv_node_default_head_vector(const GanvNode* self, double* dx, double* dy) { + (void)tail; + GanvCanvas* canvas = ganv_item_get_canvas(GANV_ITEM(self)); *x = GANV_ITEM(self)->impl->x; @@ -197,6 +197,8 @@ ganv_port_tail_vector(const GanvNode* self, double* dx, double* dy) { + (void)head; + GanvPort* port = GANV_PORT(self); GanvItem* item = &port->box.node.item; GanvCanvas* canvas = ganv_item_get_canvas(item); @@ -231,6 +233,8 @@ ganv_port_head_vector(const GanvNode* self, double* dx, double* dy) { + (void)tail; + GanvPort* port = GANV_PORT(self); GanvItem* item = &port->box.node.item; GanvCanvas* canvas = ganv_item_get_canvas(item); @@ -279,6 +279,11 @@ static void ganv_text_draw(GanvItem* item, cairo_t* cr, double cx, double cy, double cw, double ch) { + (void)cx; + (void)cy; + (void)cw; + (void)ch; + GanvText* text = GANV_TEXT(item); GanvTextPrivate* impl = text->impl; diff --git a/src/widget.c b/src/widget.c index 59b360a..5828922 100644 --- a/src/widget.c +++ b/src/widget.c @@ -147,6 +147,8 @@ recalc_bounds(GanvWidget* witem) static void do_destroy(GtkObject* object, gpointer data) { + (void)object; + GanvWidget* witem = GANV_WIDGET(data); witem->impl->in_destroy = TRUE; @@ -323,6 +325,12 @@ static void ganv_widget_draw(GanvItem* item, cairo_t* cr, double cx, double cy, double cw, double ch) { + (void)cr; + (void)cx; + (void)cy; + (void)cw; + (void)ch; + GanvWidget* witem = GANV_WIDGET(item); if (witem->impl->widget) { |