diff options
-rw-r--r-- | src/state.c | 3 | ||||
-rw-r--r-- | src/util.c | 4 | ||||
-rw-r--r-- | src/world.c | 6 |
3 files changed, 7 insertions, 6 deletions
diff --git a/src/state.c b/src/state.c index d741e4a..e4e381a 100644 --- a/src/state.c +++ b/src/state.c @@ -433,7 +433,8 @@ lilv_state_new_from_instance(const LilvPlugin* plugin, const LilvPort* const port = plugin->ports[i]; if (lilv_port_is_a(plugin, port, lv2_ControlPort) && lilv_port_is_a(plugin, port, lv2_InputPort)) { - uint32_t size, type; + uint32_t size = 0; + uint32_t type = 0; const char* sym = lilv_node_as_string(port->symbol); const void* value = get_value(sym, user_data, &size, &type); append_port_value(state, sym, value, size, type); @@ -417,7 +417,7 @@ update_latest(const char* path, const char* name, void* data) { Latest* latest = (Latest*)data; char* entry_path = lilv_path_join(path, name); - unsigned num; + unsigned num = 0; if (sscanf(entry_path, latest->pattern, &num) == 1) { struct stat st; if (!stat(entry_path, &st)) { @@ -574,7 +574,7 @@ lilv_dir_for_each(const char* path, #else DIR* dir = opendir(path); if (dir) { - for (struct dirent* entry; (entry = readdir(dir));) { + for (struct dirent* entry = NULL; (entry = readdir(dir));) { f(path, entry->d_name, data); } closedir(dir); diff --git a/src/world.c b/src/world.c index fc4fc7e..2650490 100644 --- a/src/world.c +++ b/src/world.c @@ -892,7 +892,7 @@ lilv_world_drop_graph(LilvWorld* world, const SordNode* graph) static int lilv_world_unload_file(LilvWorld* world, const LilvNode* file) { - ZixTreeIter* iter; + ZixTreeIter* iter = NULL; if (!zix_tree_find((ZixTree*)world->loaded_files, file, &iter)) { zix_tree_remove((ZixTree*)world->loaded_files, iter); return 0; @@ -1108,12 +1108,12 @@ lilv_world_load_all(LilvWorld* world) SerdStatus lilv_world_load_file(LilvWorld* world, SerdReader* reader, const LilvNode* uri) { - ZixTreeIter* iter; + ZixTreeIter* iter = NULL; if (!zix_tree_find((ZixTree*)world->loaded_files, uri, &iter)) { return SERD_FAILURE; // File has already been loaded } - size_t uri_len; + size_t uri_len = 0; const uint8_t* const uri_str = sord_node_get_string_counted( uri->node, &uri_len); if (strncmp((const char*)uri_str, "file:", 5)) { |