diff options
author | David Robillard <d@drobilla.net> | 2021-01-10 22:06:21 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2021-01-11 12:25:16 +0100 |
commit | 1d0547504963fcbe28dba9d3913a2398df65a938 (patch) | |
tree | 14ce1ac6bfb531459dfa6717fd1575ca3c524e16 /src | |
parent | 37f824f48e8141cd039e5acb318f8e62a93498e3 (diff) | |
download | lilv-1d0547504963fcbe28dba9d3913a2398df65a938.tar.gz lilv-1d0547504963fcbe28dba9d3913a2398df65a938.tar.bz2 lilv-1d0547504963fcbe28dba9d3913a2398df65a938.zip |
Fix unused parameter warnings
Diffstat (limited to 'src')
-rw-r--r-- | src/collections.c | 9 | ||||
-rw-r--r-- | src/plugin.c | 2 | ||||
-rw-r--r-- | src/port.c | 12 | ||||
-rw-r--r-- | src/state.c | 12 | ||||
-rw-r--r-- | src/world.c | 19 |
5 files changed, 52 insertions, 2 deletions
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); @@ -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 |