From 1ac0d686b1a540f3ffe5a948f07f53b9a9cdbe5b Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 9 Aug 2012 01:50:07 +0000 Subject: Fix warnings: -Wshadow -Wpointer-arith -Wcast-align -Wstrict-prototypes -Wmissing-prototypes. git-svn-id: http://svn.drobilla.net/lad/trunk/lilv@4631 a436a847-0d15-0410-975c-d299462d15a1 --- src/state.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/state.c') diff --git a/src/state.c b/src/state.c index c058f8d..6a6d339 100644 --- a/src/state.c +++ b/src/state.c @@ -200,16 +200,16 @@ make_path(LV2_State_Make_Path_Handle handle, const char* path) static char* abstract_path(LV2_State_Map_Path_Handle handle, - const char* absolute_path) + const char* abs_path) { LilvState* state = (LilvState*)handle; char* path = NULL; - char* real_path = lilv_realpath(absolute_path); + char* real_path = lilv_realpath(abs_path); const PathMap key = { (char*)real_path, NULL }; ZixTreeIter* iter = NULL; - if (absolute_path[0] == '\0') { - return lilv_strdup(absolute_path); + if (abs_path[0] == '\0') { + return lilv_strdup(abs_path); } else if (!zix_tree_find(state->abs2rel, &key, &iter)) { // Already mapped path in a previous call PathMap* pm = (PathMap*)zix_tree_get(iter); @@ -259,26 +259,26 @@ abstract_path(LV2_State_Map_Path_Handle handle, static char* absolute_path(LV2_State_Map_Path_Handle handle, - const char* abstract_path) + const char* state_path) { LilvState* state = (LilvState*)handle; char* path = NULL; - if (lilv_path_is_absolute(abstract_path)) { + if (lilv_path_is_absolute(state_path)) { // Absolute path, return identical path - path = lilv_strdup(abstract_path); + path = lilv_strdup(state_path); } else if (state->dir) { // Relative path inside state directory - path = lilv_path_join(state->dir, abstract_path); + path = lilv_path_join(state->dir, state_path); } else { // State has not been saved, unmap - path = lilv_strdup(lilv_state_rel2abs(state, abstract_path)); + path = lilv_strdup(lilv_state_rel2abs(state, state_path)); } return path; } /** Return a new features array which is @c feature added to @c features. */ -const LV2_Feature** +static const LV2_Feature** add_features(const LV2_Feature *const * features, const LV2_Feature* map, const LV2_Feature* make) { -- cgit v1.2.1