From a8f6cb4e48371ace96a462134b72798020bdfee5 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 6 Apr 2012 20:29:20 +0000 Subject: Fix compilation under MSVC. git-svn-id: http://svn.drobilla.net/lad/trunk/lilv@4149 a436a847-0d15-0410-975c-d299462d15a1 --- src/state.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/state.c b/src/state.c index a9dfe27..735a8e4 100644 --- a/src/state.c +++ b/src/state.c @@ -159,7 +159,7 @@ store_callback(LV2_State_Handle handle, prop->type = type; prop->flags = flags; - return 0; + return LV2_STATE_SUCCESS; } static const void* @@ -839,7 +839,8 @@ lilv_state_write(LilvWorld* world, p = serd_node_from_string(SERD_URI, USTR(key)); if (prop->type == state->atom_Path && !dir) { - const char* abs_path = lilv_state_rel2abs(state, prop->value); + const char* path = (const char*)prop->value; + const char* abs_path = lilv_state_rel2abs(state, path); sratom_write(sratom, unmap, SERD_ANON_CONT, &state_node, &p, prop->type, strlen(abs_path) + 1, abs_path); @@ -1071,6 +1072,6 @@ void lilv_state_set_label(LilvState* state, const char* label) { const size_t len = strlen(label); - state->label = realloc(state->label, len + 1); + state->label = (char*)realloc(state->label, len + 1); memcpy(state->label, label, len + 1); } -- cgit v1.2.1