summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS3
-rw-r--r--bindings/test/bindings_test_plugin.c26
-rw-r--r--src/collections.c9
-rw-r--r--src/plugin.c2
-rw-r--r--src/port.c12
-rw-r--r--src/state.c12
-rw-r--r--src/world.c19
-rw-r--r--test/bad_syntax.lv2/bad_syntax.c7
-rw-r--r--test/failed_instantiation.lv2/failed_instantiation.c20
-rw-r--r--test/failed_lib_descriptor.lv2/failed_lib_descriptor.c3
-rw-r--r--test/lib_descriptor.lv2/lib_descriptor.c12
-rw-r--r--test/missing_name.lv2/missing_name.c7
-rw-r--r--test/missing_port.lv2/missing_port.c7
-rw-r--r--test/missing_port_name.lv2/missing_port_name.c7
-rw-r--r--test/new_version.lv2/new_version.c7
-rw-r--r--test/old_version.lv2/old_version.c7
-rw-r--r--test/test.lv2/test.c8
-rw-r--r--test/test_filesystem.c2
-rw-r--r--test/test_state.c16
-rw-r--r--utils/lilv-bench.c2
-rw-r--r--wscript2
21 files changed, 177 insertions, 13 deletions
diff --git a/NEWS b/NEWS
index ef5a599..c911422 100644
--- a/NEWS
+++ b/NEWS
@@ -1,8 +1,9 @@
lilv (0.24.13) unstable;
+ * Fix unused parameter warnings
* Update zix tree
- -- David Robillard <d@drobilla.net> Mon, 11 Jan 2021 11:20:00 +0000
+ -- David Robillard <d@drobilla.net> Mon, 11 Jan 2021 11:20:41 +0000
lilv (0.24.12) stable;
diff --git a/bindings/test/bindings_test_plugin.c b/bindings/test/bindings_test_plugin.c
index 0c3af4f..2df64ea 100644
--- a/bindings/test/bindings_test_plugin.c
+++ b/bindings/test/bindings_test_plugin.c
@@ -73,6 +73,11 @@ instantiate(const LV2_Descriptor* descriptor,
const char* bundle_path,
const LV2_Feature* const* features)
{
+ (void)descriptor;
+ (void)rate;
+ (void)bundle_path;
+ (void)features;
+
Test* test = (Test*)malloc(sizeof(Test));
return (LV2_Handle)test;
@@ -88,7 +93,11 @@ instantiate(const LV2_Descriptor* descriptor,
*/
static void
connect_port(LV2_Handle instance, uint32_t port, void* data)
-{}
+{
+ (void)instance;
+ (void)port;
+ (void)data;
+}
/**
The activate() method is called by the host to initialise and prepare the
@@ -101,12 +110,17 @@ connect_port(LV2_Handle instance, uint32_t port, void* data)
*/
static void
activate(LV2_Handle instance)
-{}
+{
+ (void)instance;
+}
/** Process a block of audio (audio thread, must be RT safe). */
static void
run(LV2_Handle instance, uint32_t n_samples)
-{}
+{
+ (void)instance;
+ (void)n_samples;
+}
/**
The deactivate() method is the counterpart to activate() called by the host
@@ -121,7 +135,9 @@ run(LV2_Handle instance, uint32_t n_samples)
*/
static void
deactivate(LV2_Handle instance)
-{}
+{
+ (void)instance;
+}
/**
Destroy a plugin instance (counterpart to instantiate()).
@@ -148,6 +164,8 @@ cleanup(LV2_Handle instance)
static const void*
extension_data(const char* uri)
{
+ (void)uri;
+
return NULL;
}
diff --git a/src/collections.c b/src/collections.c
index fdaca93..c2c752a 100644
--- a/src/collections.c
+++ b/src/collections.c
@@ -28,14 +28,19 @@
int
lilv_ptr_cmp(const void* a, const void* b, const void* user_data)
{
+ (void)user_data;
+
return (intptr_t)a - (intptr_t)b;
}
int
lilv_resource_node_cmp(const void* a, const void* b, const void* user_data)
{
+ (void)user_data;
+
const SordNode* an = ((const LilvNode*)a)->node;
const SordNode* bn = ((const LilvNode*)b)->node;
+
return (intptr_t)an - (intptr_t)bn;
}
@@ -70,6 +75,8 @@ lilv_collection_begin(const LilvCollection* collection)
void*
lilv_collection_get(const LilvCollection* collection, const LilvIter* i)
{
+ (void)collection;
+
return zix_tree_get((const ZixTreeIter*)i);
}
@@ -185,11 +192,13 @@ lilv_nodes_merge(const LilvNodes* a, const LilvNodes* b)
\
LilvIter* prefix##_next(const CT* collection, LilvIter* i) \
{ \
+ (void)collection; \
return zix_tree_iter_next((ZixTreeIter*)i); \
} \
\
bool prefix##_is_end(const CT* collection, LilvIter* i) \
{ \
+ (void)collection; \
return zix_tree_iter_is_end((ZixTreeIter*)i); \
}
diff --git a/src/plugin.c b/src/plugin.c
index 9613468..9c7cbfd 100644
--- a/src/plugin.c
+++ b/src/plugin.c
@@ -1095,6 +1095,8 @@ lilv_plugin_write_manifest_entry(LilvWorld* world,
FILE* manifest_file,
const char* plugin_file_path)
{
+ (void)world;
+
const LilvNode* subject = lilv_plugin_get_uri(plugin);
const SerdNode* base = sord_node_to_serd_node(base_uri->node);
SerdEnv* env = new_lv2_env(base);
diff --git a/src/port.c b/src/port.c
index 0142d06..71edaf1 100644
--- a/src/port.c
+++ b/src/port.c
@@ -47,6 +47,8 @@ lilv_port_new(LilvWorld* world,
void
lilv_port_free(const LilvPlugin* plugin, LilvPort* port)
{
+ (void)plugin;
+
if (port) {
lilv_node_free(port->node);
lilv_nodes_free(port->classes);
@@ -60,6 +62,8 @@ lilv_port_is_a(const LilvPlugin* plugin,
const LilvPort* port,
const LilvNode* port_class)
{
+ (void)plugin;
+
LILV_FOREACH (nodes, i, port->classes) {
if (lilv_node_equals(lilv_nodes_get(port->classes, i), port_class)) {
return true;
@@ -112,6 +116,8 @@ lilv_port_get_value_by_node(const LilvPlugin* plugin,
const LilvNode*
lilv_port_get_node(const LilvPlugin* plugin, const LilvPort* port)
{
+ (void)plugin;
+
return port->node;
}
@@ -146,12 +152,16 @@ lilv_port_get(const LilvPlugin* plugin,
uint32_t
lilv_port_get_index(const LilvPlugin* plugin, const LilvPort* port)
{
+ (void)plugin;
+
return port->index;
}
const LilvNode*
lilv_port_get_symbol(const LilvPlugin* plugin, const LilvPort* port)
{
+ (void)plugin;
+
return port->symbol;
}
@@ -181,6 +191,8 @@ lilv_port_get_name(const LilvPlugin* plugin, const LilvPort* port)
const LilvNodes*
lilv_port_get_classes(const LilvPlugin* plugin, const LilvPort* port)
{
+ (void)plugin;
+
return port->classes;
}
diff --git a/src/state.c b/src/state.c
index b74cd7a..a4a50a9 100644
--- a/src/state.c
+++ b/src/state.c
@@ -83,12 +83,16 @@ struct LilvStateImpl {
static int
abs_cmp(const void* a, const void* b, const void* user_data)
{
+ (void)user_data;
+
return strcmp(((const PathMap*)a)->abs, ((const PathMap*)b)->abs);
}
static int
rel_cmp(const void* a, const void* b, const void* user_data)
{
+ (void)user_data;
+
return strcmp(((const PathMap*)a)->rel, ((const PathMap*)b)->rel);
}
@@ -241,6 +245,8 @@ retrieve_callback(LV2_State_Handle handle,
static bool
path_exists(const char* path, const void* ignored)
{
+ (void)ignored;
+
return lilv_path_exists(path);
}
@@ -414,6 +420,8 @@ state_strerror(LV2_State_Status st)
static void
lilv_free_path(LV2_State_Free_Path_Handle handle, char* path)
{
+ (void)handle;
+
lilv_free(path);
}
@@ -885,6 +893,8 @@ write_manifest(LilvWorld* world,
SordModel* model,
const SerdNode* file_uri)
{
+ (void)world;
+
char* const path = (char*)serd_file_uri_parse(file_uri->buf, NULL);
FILE* const wfd = fopen(path, "w");
if (!wfd) {
@@ -1069,6 +1079,8 @@ lilv_state_write(LilvWorld* world,
const char* uri,
const char* dir)
{
+ (void)world;
+
SerdNode lv2_appliesTo =
serd_node_from_string(SERD_CURIE, USTR("lv2:appliesTo"));
diff --git a/src/world.c b/src/world.c
index 9020ce7..47dc147 100644
--- a/src/world.c
+++ b/src/world.c
@@ -358,8 +358,11 @@ lilv_world_blank_node_prefix(LilvWorld* world)
int
lilv_header_compare_by_uri(const void* a, const void* b, const void* user_data)
{
+ (void)user_data;
+
const struct LilvHeader* const header_a = (const struct LilvHeader*)a;
const struct LilvHeader* const header_b = (const struct LilvHeader*)b;
+
return strcmp(lilv_node_as_uri(header_a->uri),
lilv_node_as_uri(header_b->uri));
}
@@ -374,9 +377,14 @@ lilv_header_compare_by_uri(const void* a, const void* b, const void* user_data)
int
lilv_lib_compare(const void* a, const void* b, const void* user_data)
{
+ (void)user_data;
+
const LilvLib* const lib_a = (const LilvLib*)a;
const LilvLib* const lib_b = (const LilvLib*)b;
- int cmp = strcmp(lilv_node_as_uri(lib_a->uri), lilv_node_as_uri(lib_b->uri));
+
+ const int cmp =
+ strcmp(lilv_node_as_uri(lib_a->uri), lilv_node_as_uri(lib_b->uri));
+
return cmp ? cmp : strcmp(lib_a->bundle_path, lib_b->bundle_path);
}
@@ -434,6 +442,8 @@ lilv_world_add_plugin(LilvWorld* world,
void* dynmanifest,
const SordNode* bundle)
{
+ (void)dynmanifest;
+
LilvNode* plugin_uri = lilv_node_new_from_node(world, plugin_node);
ZixTreeIter* z = NULL;
LilvPlugin* plugin =
@@ -636,7 +646,12 @@ lilv_world_load_dyn_manifest(LilvWorld* world,
}
sord_iter_free(iter);
sord_free(model);
-#endif // LILV_DYN_MANIFEST
+
+#else // LILV_DYN_MANIFEST
+ (void)world;
+ (void)bundle_node;
+ (void)manifest;
+#endif
}
#ifdef LILV_DYN_MANIFEST
diff --git a/test/bad_syntax.lv2/bad_syntax.c b/test/bad_syntax.lv2/bad_syntax.c
index 72166c0..da9c041 100644
--- a/test/bad_syntax.lv2/bad_syntax.c
+++ b/test/bad_syntax.lv2/bad_syntax.c
@@ -57,6 +57,11 @@ instantiate(const LV2_Descriptor* descriptor,
const char* path,
const LV2_Feature* const* features)
{
+ (void)descriptor;
+ (void)rate;
+ (void)path;
+ (void)features;
+
Test* test = (Test*)calloc(1, sizeof(Test));
if (!test) {
return NULL;
@@ -68,6 +73,8 @@ instantiate(const LV2_Descriptor* descriptor,
static void
run(LV2_Handle instance, uint32_t sample_count)
{
+ (void)sample_count;
+
Test* test = (Test*)instance;
*test->output = *test->input;
diff --git a/test/failed_instantiation.lv2/failed_instantiation.c b/test/failed_instantiation.lv2/failed_instantiation.c
index d805848..ecab647 100644
--- a/test/failed_instantiation.lv2/failed_instantiation.c
+++ b/test/failed_instantiation.lv2/failed_instantiation.c
@@ -31,11 +31,17 @@ typedef struct {
static void
cleanup(LV2_Handle instance)
-{}
+{
+ (void)instance;
+}
static void
connect_port(LV2_Handle instance, uint32_t port, void* data)
-{}
+{
+ (void)instance;
+ (void)port;
+ (void)data;
+}
static LV2_Handle
instantiate(const LV2_Descriptor* descriptor,
@@ -43,12 +49,20 @@ instantiate(const LV2_Descriptor* descriptor,
const char* path,
const LV2_Feature* const* features)
{
+ (void)descriptor;
+ (void)rate;
+ (void)path;
+ (void)features;
+
return NULL;
}
static void
run(LV2_Handle instance, uint32_t sample_count)
-{}
+{
+ (void)instance;
+ (void)sample_count;
+}
static const LV2_Descriptor descriptor = {
PLUGIN_URI,
diff --git a/test/failed_lib_descriptor.lv2/failed_lib_descriptor.c b/test/failed_lib_descriptor.lv2/failed_lib_descriptor.c
index 180c8ae..c7c08cf 100644
--- a/test/failed_lib_descriptor.lv2/failed_lib_descriptor.c
+++ b/test/failed_lib_descriptor.lv2/failed_lib_descriptor.c
@@ -23,5 +23,8 @@ LV2_SYMBOL_EXPORT
const LV2_Lib_Descriptor*
lv2_lib_descriptor(const char* bundle_path, const LV2_Feature* const* features)
{
+ (void)bundle_path;
+ (void)features;
+
return NULL;
}
diff --git a/test/lib_descriptor.lv2/lib_descriptor.c b/test/lib_descriptor.lv2/lib_descriptor.c
index 0a14a23..ab27c2b 100644
--- a/test/lib_descriptor.lv2/lib_descriptor.c
+++ b/test/lib_descriptor.lv2/lib_descriptor.c
@@ -57,6 +57,11 @@ instantiate(const LV2_Descriptor* descriptor,
const char* path,
const LV2_Feature* const* features)
{
+ (void)descriptor;
+ (void)rate;
+ (void)path;
+ (void)features;
+
Test* test = (Test*)calloc(1, sizeof(Test));
if (!test) {
return NULL;
@@ -68,6 +73,8 @@ instantiate(const LV2_Descriptor* descriptor,
static void
run(LV2_Handle instance, uint32_t sample_count)
{
+ (void)sample_count;
+
Test* test = (Test*)instance;
*test->output = *test->input;
@@ -87,6 +94,8 @@ static const LV2_Descriptor descriptor = {
static const LV2_Descriptor*
get_plugin(LV2_Lib_Handle handle, uint32_t index)
{
+ (void)handle;
+
switch (index) {
case 0:
return &descriptor;
@@ -104,5 +113,8 @@ LV2_SYMBOL_EXPORT
const LV2_Lib_Descriptor*
lv2_lib_descriptor(const char* bundle_path, const LV2_Feature* const* features)
{
+ (void)bundle_path;
+ (void)features;
+
return &lib;
}
diff --git a/test/missing_name.lv2/missing_name.c b/test/missing_name.lv2/missing_name.c
index 2f53cf4..8c6e6fe 100644
--- a/test/missing_name.lv2/missing_name.c
+++ b/test/missing_name.lv2/missing_name.c
@@ -57,6 +57,11 @@ instantiate(const LV2_Descriptor* descriptor,
const char* path,
const LV2_Feature* const* features)
{
+ (void)descriptor;
+ (void)rate;
+ (void)path;
+ (void)features;
+
Test* test = (Test*)calloc(1, sizeof(Test));
if (!test) {
return NULL;
@@ -68,6 +73,8 @@ instantiate(const LV2_Descriptor* descriptor,
static void
run(LV2_Handle instance, uint32_t sample_count)
{
+ (void)sample_count;
+
Test* test = (Test*)instance;
*test->output = *test->input;
diff --git a/test/missing_port.lv2/missing_port.c b/test/missing_port.lv2/missing_port.c
index e2fa77a..c567d55 100644
--- a/test/missing_port.lv2/missing_port.c
+++ b/test/missing_port.lv2/missing_port.c
@@ -57,6 +57,11 @@ instantiate(const LV2_Descriptor* descriptor,
const char* path,
const LV2_Feature* const* features)
{
+ (void)descriptor;
+ (void)rate;
+ (void)path;
+ (void)features;
+
Test* test = (Test*)calloc(1, sizeof(Test));
if (!test) {
return NULL;
@@ -68,6 +73,8 @@ instantiate(const LV2_Descriptor* descriptor,
static void
run(LV2_Handle instance, uint32_t sample_count)
{
+ (void)sample_count;
+
Test* test = (Test*)instance;
*test->output = *test->input;
diff --git a/test/missing_port_name.lv2/missing_port_name.c b/test/missing_port_name.lv2/missing_port_name.c
index 2b8efe0..7a00945 100644
--- a/test/missing_port_name.lv2/missing_port_name.c
+++ b/test/missing_port_name.lv2/missing_port_name.c
@@ -57,6 +57,11 @@ instantiate(const LV2_Descriptor* descriptor,
const char* path,
const LV2_Feature* const* features)
{
+ (void)descriptor;
+ (void)rate;
+ (void)path;
+ (void)features;
+
Test* test = (Test*)calloc(1, sizeof(Test));
if (!test) {
return NULL;
@@ -68,6 +73,8 @@ instantiate(const LV2_Descriptor* descriptor,
static void
run(LV2_Handle instance, uint32_t sample_count)
{
+ (void)sample_count;
+
Test* test = (Test*)instance;
*test->output = *test->input;
diff --git a/test/new_version.lv2/new_version.c b/test/new_version.lv2/new_version.c
index ac5c6ad..4de48e7 100644
--- a/test/new_version.lv2/new_version.c
+++ b/test/new_version.lv2/new_version.c
@@ -57,6 +57,11 @@ instantiate(const LV2_Descriptor* descriptor,
const char* path,
const LV2_Feature* const* features)
{
+ (void)descriptor;
+ (void)rate;
+ (void)path;
+ (void)features;
+
Test* test = (Test*)calloc(1, sizeof(Test));
if (!test) {
return NULL;
@@ -68,6 +73,8 @@ instantiate(const LV2_Descriptor* descriptor,
static void
run(LV2_Handle instance, uint32_t sample_count)
{
+ (void)sample_count;
+
Test* test = (Test*)instance;
*test->output = *test->input;
diff --git a/test/old_version.lv2/old_version.c b/test/old_version.lv2/old_version.c
index ae25ad2..7f97dad 100644
--- a/test/old_version.lv2/old_version.c
+++ b/test/old_version.lv2/old_version.c
@@ -57,6 +57,11 @@ instantiate(const LV2_Descriptor* descriptor,
const char* path,
const LV2_Feature* const* features)
{
+ (void)descriptor;
+ (void)rate;
+ (void)path;
+ (void)features;
+
Test* test = (Test*)calloc(1, sizeof(Test));
if (!test) {
return NULL;
@@ -68,6 +73,8 @@ instantiate(const LV2_Descriptor* descriptor,
static void
run(LV2_Handle instance, uint32_t sample_count)
{
+ (void)sample_count;
+
Test* test = (Test*)instance;
*test->output = *test->input;
diff --git a/test/test.lv2/test.c b/test/test.lv2/test.c
index d6b2544..2be34b4 100644
--- a/test/test.lv2/test.c
+++ b/test/test.lv2/test.c
@@ -95,6 +95,10 @@ instantiate(const LV2_Descriptor* descriptor,
const char* path,
const LV2_Feature* const* features)
{
+ (void)descriptor;
+ (void)rate;
+ (void)path;
+
Test* test = (Test*)calloc(1, sizeof(Test));
if (!test) {
return NULL;
@@ -171,6 +175,8 @@ save(LV2_Handle instance,
uint32_t flags,
const LV2_Feature* const* features)
{
+ (void)flags;
+
Test* plugin = (Test*)instance;
LV2_State_Map_Path* map_path = NULL;
@@ -329,6 +335,8 @@ restore(LV2_Handle instance,
uint32_t flags,
const LV2_Feature* const* features)
{
+ (void)flags;
+
Test* plugin = (Test*)instance;
LV2_State_Map_Path* map_path = NULL;
diff --git a/test/test_filesystem.c b/test/test_filesystem.c
index 2a4c94f..0a4aa4d 100644
--- a/test/test_filesystem.c
+++ b/test/test_filesystem.c
@@ -401,6 +401,8 @@ typedef struct {
static void
visit(const char* const path, const char* const name, void* const data)
{
+ (void)path;
+
FileList* file_list = (FileList*)data;
file_list->names =
diff --git a/test/test_state.c b/test/test_state.c
index ceb5b71..533c3a9 100644
--- a/test/test_state.c
+++ b/test/test_state.c
@@ -155,6 +155,8 @@ no_test_directories(void)
static void
remove_file(const char* path, const char* name, void* data)
{
+ (void)data;
+
char* const full_path = lilv_path_join(path, name);
assert(!lilv_remove(full_path));
free(full_path);
@@ -215,6 +217,9 @@ set_port_value(const char* port_symbol,
uint32_t size,
uint32_t type)
{
+ (void)size;
+ (void)type;
+
TestContext* ctx = (TestContext*)user_data;
if (!strcmp(port_symbol, "input")) {
@@ -535,6 +540,14 @@ count_sink(void* const handle,
const SerdNode* const object_datatype,
const SerdNode* const object_lang)
{
+ (void)flags;
+ (void)graph;
+ (void)subject;
+ (void)predicate;
+ (void)object;
+ (void)object_datatype;
+ (void)object_lang;
+
size_t* const n_statements = (size_t*)handle;
++(*n_statements);
@@ -1009,6 +1022,9 @@ test_bad_subject(void)
static void
count_file(const char* path, const char* name, void* data)
{
+ (void)path;
+ (void)name;
+
*(unsigned*)data += 1;
}
diff --git a/utils/lilv-bench.c b/utils/lilv-bench.c
index d6dc615..56b7fee 100644
--- a/utils/lilv-bench.c
+++ b/utils/lilv-bench.c
@@ -17,7 +17,7 @@
#include "lilv/lilv.h"
int
-main(int argc, char** argv)
+main(void)
{
LilvWorld* world = lilv_world_new();
lilv_world_load_all(world);
diff --git a/wscript b/wscript
index f95c88b..7005967 100644
--- a/wscript
+++ b/wscript
@@ -147,7 +147,6 @@ def configure(conf):
'-Wno-shorten-64-to-32',
'-Wno-sign-conversion',
'-Wno-switch-enum',
- '-Wno-unused-parameter',
'-Wno-vla',
],
'gcc': [
@@ -161,7 +160,6 @@ def configure(conf):
'-Wno-suggest-attribute=const',
'-Wno-suggest-attribute=pure',
'-Wno-switch-enum',
- '-Wno-unused-parameter',
'-Wno-vla',
],
'msvc': [