aboutsummaryrefslogtreecommitdiff
path: root/props.lv2
diff options
context:
space:
mode:
authorHanspeter Portner <dev@open-music-kontrollers.ch>2018-04-05 08:33:53 +0200
committerHanspeter Portner <dev@open-music-kontrollers.ch>2018-04-05 08:33:53 +0200
commitc0bca18d644d9583dc5f5974f968df72ad8560d1 (patch)
tree98b8aac7d5a4474f9416e32b70b6277e7c845c6f /props.lv2
parent3a9c9eec3cc3df363c9a71f50347c1a963c139ca (diff)
parentfc8c6643379439d9f842104e2a7da69131449639 (diff)
downloadsherlock.lv2-c0bca18d644d9583dc5f5974f968df72ad8560d1.tar.xz
Merge commit 'fc8c6643379439d9f842104e2a7da69131449639' into meson
Diffstat (limited to 'props.lv2')
-rw-r--r--props.lv2/props.h22
1 files changed, 9 insertions, 13 deletions
diff --git a/props.lv2/props.h b/props.lv2/props.h
index 6151b8d..463e123 100644
--- a/props.lv2/props.h
+++ b/props.lv2/props.h
@@ -125,7 +125,7 @@ struct _props_t {
#define PROPS_T(PROPS, MAX_NIMPLS) \
props_t (PROPS); \
- props_impl_t _impls [(MAX_NIMPLS)];
+ props_impl_t _impls [(MAX_NIMPLS)]
// rt-safe
static inline int
@@ -176,13 +176,11 @@ props_restore(props_t *props, LV2_State_Retrieve_Function retrieve,
*****************************************************************************/
// enumerations
-typedef enum _props_state_t props_state_t;
-
-enum _props_state_t {
+typedef enum _props_state_t {
PROP_STATE_NONE = 0,
PROP_STATE_LOCK = 1,
PROP_STATE_RESTORE = 2
-};
+} props_state_t;
static inline void
_props_impl_spin_lock(props_impl_t *impl, int from, int to)
@@ -434,8 +432,8 @@ _props_impl_init(props_t *props, props_impl_t *impl, const props_def_t *def,
impl->property = property;
impl->access = access;
impl->def = def;
- impl->value.body = value_base + def->offset;
- impl->stash.body = stash_base + def->offset;
+ impl->value.body = (uint8_t *)value_base + def->offset;
+ impl->stash.body = (uint8_t *)stash_base + def->offset;
uint32_t size;
if( (type == props->urid.atom_int)
@@ -617,7 +615,6 @@ props_advance(props_t *props, LV2_Atom_Forge *forge, uint32_t frames,
for(unsigned i = 0; i < props->nimpls; i++)
{
props_impl_t *impl = &props->impls[i];
- const props_def_t *def = impl->def;
if(*ref)
*ref = _props_patch_set(props, forge, frames, impl, sequence_num);
@@ -633,8 +630,6 @@ props_advance(props_t *props, LV2_Atom_Forge *forge, uint32_t frames,
{
*ref = _props_patch_set(props, forge, frames, impl, sequence_num);
- const props_def_t *def = impl->def;
-
return 1;
}
else if(sequence_num)
@@ -859,8 +854,8 @@ props_save(props_t *props, LV2_State_Store_Function store,
if( map_path && (impl->type == props->urid.atom_path) )
{
const char *path = strstr(body, "file://")
- ? body + 7 // skip "file://"
- : body;
+ ? (char *)body + 7 // skip "file://"
+ : (char *)body;
char *abstract = map_path->abstract_path(map_path->handle, path);
if(abstract)
{
@@ -884,7 +879,8 @@ props_save(props_t *props, LV2_State_Store_Function store,
static inline LV2_State_Status
props_restore(props_t *props, LV2_State_Retrieve_Function retrieve,
- LV2_State_Handle state, uint32_t flags, const LV2_Feature *const *features)
+ LV2_State_Handle state, uint32_t flags __attribute__((unused)),
+ const LV2_Feature *const *features)
{
const LV2_State_Map_Path *map_path = NULL;