diff options
author | David Robillard <d@drobilla.net> | 2007-10-04 01:42:35 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2007-10-04 01:42:35 +0000 |
commit | c1b50ad1aabd55702c0b20392dc9ad40813ca976 (patch) | |
tree | cede4b63ea519177507a647e1e0aa223d247e7f5 /src/world.c | |
parent | 33dd73d3d9fcd86f285062d825df57e0612d85a9 (diff) | |
download | lilv-c1b50ad1aabd55702c0b20392dc9ad40813ca976.tar.gz lilv-c1b50ad1aabd55702c0b20392dc9ad40813ca976.tar.bz2 lilv-c1b50ad1aabd55702c0b20392dc9ad40813ca976.zip |
Fix librdf warnings.
git-svn-id: http://svn.drobilla.net/lad/slv2@821 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/world.c')
-rw-r--r-- | src/world.c | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/src/world.c b/src/world.c index c3d500c..4b832b7 100644 --- a/src/world.c +++ b/src/world.c @@ -335,18 +335,6 @@ slv2_world_load_path(SLV2World world, } -/** comparator for sorting */ -/*int -slv2_plugin_compare_by_uri(const void* a, const void* b) -{ - SLV2Plugin plugin_a = *(SLV2Plugin*)a; - SLV2Plugin plugin_b = *(SLV2Plugin*)b; - - return strcmp((const char*)librdf_uri_as_string(plugin_a->plugin_uri), - (const char*)librdf_uri_as_string(plugin_b->plugin_uri)); -} -*/ - void slv2_world_load_specifications(SLV2World world) { @@ -410,8 +398,10 @@ slv2_world_load_plugin_classes(SLV2World world) librdf_node* label_node = librdf_query_results_get_binding_value(results, 2); const char* label = (const char*)librdf_node_get_literal_value(label_node); + assert(class_uri); + SLV2PluginClass plugin_class = slv2_plugin_class_new(world, - (const char*)librdf_uri_as_string(parent_uri), + parent_uri ? (const char*)librdf_uri_as_string(parent_uri) : NULL, (const char*)librdf_uri_as_string(class_uri), label); raptor_sequence_push(world->plugin_classes, plugin_class); @@ -502,6 +492,9 @@ slv2_world_load_all(SLV2World world) librdf_node* binary_node = librdf_query_results_get_binding_value(results, 3); librdf_uri* binary_uri = librdf_node_get_uri(binary_node); + assert(plugin_uri); + assert(data_uri); + SLV2Plugin plugin = slv2_plugins_get_by_uri(world->plugins, (const char*)librdf_uri_as_string(plugin_uri)); @@ -525,9 +518,6 @@ slv2_world_load_all(SLV2World world) librdf_query_results_next(results); } - // 'ORDER BY ?plugin' guarantees this - //raptor_sequence_sort(world->plugins, slv2_plugin_compare_by_uri); - if (results) librdf_free_query_results(results); |