summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS3
-rw-r--r--ganv/Item.hpp5
-rw-r--r--ganv/Module.hpp4
-rw-r--r--ganv/Node.hpp2
-rw-r--r--ganv/wrap.hpp2
-rw-r--r--src/Canvas.cpp20
-rw-r--r--src/Port.cpp2
-rw-r--r--src/edge.c5
-rw-r--r--src/group.c4
-rw-r--r--src/item.c11
-rw-r--r--src/module.c4
-rw-r--r--src/node.c11
-rw-r--r--src/port.c4
-rw-r--r--src/text.c5
-rw-r--r--src/widget.c8
-rw-r--r--wscript2
16 files changed, 70 insertions, 22 deletions
diff --git a/NEWS b/NEWS
index 800be1a..908793a 100644
--- a/NEWS
+++ b/NEWS
@@ -1,8 +1,9 @@
ganv (1.7.0) unstable;
* Expand canvas automatically to fit nodes
+ * Fix various compiler warnings
- -- David Robillard <d@drobilla.net> Thu, 30 Jul 2020 19:13:38 +0000
+ -- David Robillard <d@drobilla.net> Sun, 29 Nov 2020 10:51:22 +0000
ganv (1.6.0) stable;
diff --git a/ganv/Item.hpp b/ganv/Item.hpp
index ebeb865..fcb98ef 100644
--- a/ganv/Item.hpp
+++ b/ganv/Item.hpp
@@ -76,10 +76,7 @@ protected:
GanvItem* const _gobj;
private:
- static gboolean
- on_item_event(GanvItem* canvasitem,
- GdkEvent* ev,
- void* item)
+ static gboolean on_item_event(GanvItem*, GdkEvent* ev, void* item)
{
return static_cast<Item*>(item)->signal_event().emit(ev);
}
diff --git a/ganv/Module.hpp b/ganv/Module.hpp
index f076a70..00d295d 100644
--- a/ganv/Module.hpp
+++ b/ganv/Module.hpp
@@ -59,7 +59,9 @@ public:
"label", name.c_str(),
"draggable", TRUE,
nullptr)))
- {}
+ {
+ (void)show_title;
+ }
template<typename P, typename C>
class iterator_base {
diff --git a/ganv/Node.hpp b/ganv/Node.hpp
index ed983fe..c40a7ea 100644
--- a/ganv/Node.hpp
+++ b/ganv/Node.hpp
@@ -33,7 +33,7 @@ class Node;
*/
class Node : public Item {
public:
- Node(Canvas* canvas, GanvNode* gobj)
+ Node(Canvas*, GanvNode* gobj)
: Item(GANV_ITEM(g_object_ref(gobj)))
{
g_signal_connect(gobj, "moved", G_CALLBACK(on_moved), this);
diff --git a/ganv/wrap.hpp b/ganv/wrap.hpp
index f1659a7..57e6da6 100644
--- a/ganv/wrap.hpp
+++ b/ganv/wrap.hpp
@@ -25,7 +25,7 @@
#define SIGNAL1(name, argtype) \
public: \
- virtual bool on_##name(argtype arg) { return true; } \
+ virtual bool on_##name(argtype) { return true; } \
sigc::signal<bool, argtype>& signal_##name() { return _signal_##name; } \
private: \
sigc::signal<bool, argtype> _signal_##name;
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);
}
diff --git a/src/edge.c b/src/edge.c
index 85197d6..417030a 100644
--- a/src/edge.c
+++ b/src/edge.c
@@ -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) {
diff --git a/src/item.c b/src/item.c
index 95a9ca6..c44085b 100644
--- a/src/item.c
+++ b/src/item.c
@@ -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));
diff --git a/src/node.c b/src/node.c
index c7648de..c93e116 100644
--- a/src/node.c
+++ b/src/node.c
@@ -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;
diff --git a/src/port.c b/src/port.c
index 2acdf78..e06c64b 100644
--- a/src/port.c
+++ b/src/port.c
@@ -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);
diff --git a/src/text.c b/src/text.c
index c509a28..89e460e 100644
--- a/src/text.c
+++ b/src/text.c
@@ -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) {
diff --git a/wscript b/wscript
index de0a45a..aa00737 100644
--- a/wscript
+++ b/wscript
@@ -89,7 +89,6 @@ def configure(conf):
'-Wno-sign-conversion',
'-Wno-switch-enum',
'-Wno-unused-macros',
- '-Wno-unused-parameter',
'-Wno-used-but-marked-unused',
],
'gcc': [
@@ -108,7 +107,6 @@ def configure(conf):
'-Wno-sign-conversion',
'-Wno-switch-enum',
'-Wno-unused-macros',
- '-Wno-unused-parameter',
],
})