aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/eg-params.lv2
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-12-16 16:49:57 +0100
committerDavid Robillard <d@drobilla.net>2020-12-16 16:49:57 +0100
commitbbff4459368ea25f1ae1ee3452a5b5c5dcd64e06 (patch)
treeefc1fb7fd89f9e36d34d15a94482706e5c445b0c /plugins/eg-params.lv2
parent37ec8d59b349b9b735b58134a72e7372f36345dc (diff)
downloadlv2-bbff4459368ea25f1ae1ee3452a5b5c5dcd64e06.tar.xz
Isolate variable declarations and initialize all variables
Diffstat (limited to 'plugins/eg-params.lv2')
-rw-r--r--plugins/eg-params.lv2/params.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/eg-params.lv2/params.c b/plugins/eg-params.lv2/params.c
index 94d34a5..cb09e83 100644
--- a/plugins/eg-params.lv2/params.c
+++ b/plugins/eg-params.lv2/params.c
@@ -290,7 +290,7 @@ store_prop(Params* self,
LV2_URID key,
const LV2_Atom* value)
{
- LV2_State_Status st;
+ LV2_State_Status st = LV2_STATE_SUCCESS;
if (map_path && value->type == self->uris.atom_Path) {
// Map path to abstract path for portable storage
const char* path = (const char*)(value + 1);
@@ -352,10 +352,10 @@ retrieve_prop(Params* self,
LV2_URID key)
{
// Retrieve value from saved state
- size_t vsize;
- uint32_t vtype;
- uint32_t vflags;
- const void* value = retrieve(handle, key, &vsize, &vtype, &vflags);
+ size_t vsize = 0;
+ uint32_t vtype = 0;
+ uint32_t vflags = 0;
+ const void* value = retrieve(handle, key, &vsize, &vtype, &vflags);
// Set plugin instance state
const LV2_State_Status st = value