summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2021-01-10 22:06:21 +0100
committerDavid Robillard <d@drobilla.net>2021-01-11 12:25:16 +0100
commit1d0547504963fcbe28dba9d3913a2398df65a938 (patch)
tree14ce1ac6bfb531459dfa6717fd1575ca3c524e16 /test
parent37f824f48e8141cd039e5acb318f8e62a93498e3 (diff)
downloadlilv-1d0547504963fcbe28dba9d3913a2398df65a938.tar.gz
lilv-1d0547504963fcbe28dba9d3913a2398df65a938.tar.bz2
lilv-1d0547504963fcbe28dba9d3913a2398df65a938.zip
Fix unused parameter warnings
Diffstat (limited to 'test')
-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
12 files changed, 100 insertions, 3 deletions
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;
}