From 4271de2ee1830bb73bcb96828a32303ee1f2ad18 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 4 Feb 2011 06:08:02 +0000 Subject: Fix warnings when building with --strict (but without --debug). git-svn-id: http://svn.drobilla.net/lad/trunk/slv2@2909 a436a847-0d15-0410-975c-d299462d15a1 --- src/plugin.c | 4 ++-- src/world.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/plugin.c b/src/plugin.c index 4b29a00..ce2a3ee 100644 --- a/src/plugin.c +++ b/src/plugin.c @@ -164,6 +164,7 @@ slv2_plugin_load_ports_if_necessary(SLV2Plugin p) NULL); FOREACH_MATCH(ports) { + SLV2Value index = NULL; SLV2Node port = slv2_match_object(ports); SLV2Value symbol = slv2_plugin_get_unique( p, port, p->world->lv2_symbol_node); @@ -174,8 +175,7 @@ slv2_plugin_load_ports_if_necessary(SLV2Plugin p) goto error; } - SLV2Value index = slv2_plugin_get_unique( - p, port, p->world->lv2_index_node); + index = slv2_plugin_get_unique(p, port, p->world->lv2_index_node); if (!slv2_value_is_int(index)) { SLV2_ERROR("port has a non-integer index\n"); diff --git a/src/world.c b/src/world.c index 08de7ab..6f66fc3 100644 --- a/src/world.c +++ b/src/world.c @@ -541,9 +541,9 @@ slv2_world_load_plugin_classes(SLV2World world) const uint8_t* label = (const uint8_t*)sord_node_get_string(label_node); slv2_match_end(labels); - SLV2PluginClasses classes = world->plugin_classes; - const unsigned n_classes = ((GPtrArray*)classes)->len; + SLV2PluginClasses classes = world->plugin_classes; #ifndef NDEBUG + const unsigned n_classes = ((GPtrArray*)classes)->len; if (n_classes > 0) { // Class results are in increasing sorted order SLV2PluginClass prev = g_ptr_array_index((GPtrArray*)classes, -- cgit v1.2.1