diff options
author | David Robillard <d@drobilla.net> | 2014-01-24 01:49:18 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2014-01-24 01:49:18 +0000 |
commit | 0824237942af542431a8348c55c367242d1bf49a (patch) | |
tree | ab9afb3a202b434c2198a071bcb8336f2976f2a3 /lv2/lv2plug.in/ns/ext/atom | |
parent | 1cb9f77d07c998108d0ba54811ac4604a2b49725 (diff) | |
download | lv2-0824237942af542431a8348c55c367242d1bf49a.tar.xz |
Fix -Wconversion warnings in headers.
Diffstat (limited to 'lv2/lv2plug.in/ns/ext/atom')
-rw-r--r-- | lv2/lv2plug.in/ns/ext/atom/forge.h | 5 | ||||
-rw-r--r-- | lv2/lv2plug.in/ns/ext/atom/util.h | 8 |
2 files changed, 7 insertions, 6 deletions
diff --git a/lv2/lv2plug.in/ns/ext/atom/forge.h b/lv2/lv2plug.in/ns/ext/atom/forge.h index 5fcfa38..3ee3aa7 100644 --- a/lv2/lv2plug.in/ns/ext/atom/forge.h +++ b/lv2/lv2plug.in/ns/ext/atom/forge.h @@ -248,7 +248,7 @@ static inline void lv2_atom_forge_set_buffer(LV2_Atom_Forge* forge, uint8_t* buf, size_t size) { forge->buf = buf; - forge->size = size; + forge->size = (uint32_t)size; forge->offset = 0; forge->deref = NULL; forge->sink = NULL; @@ -370,7 +370,8 @@ lv2_atom_forge_primitive(LV2_Atom_Forge* forge, const LV2_Atom* a) if (lv2_atom_forge_top_is(forge, forge->Vector)) { return lv2_atom_forge_raw(forge, LV2_ATOM_BODY_CONST(a), a->size); } else { - return lv2_atom_forge_write(forge, a, sizeof(LV2_Atom) + a->size); + return lv2_atom_forge_write( + forge, a, (uint32_t)sizeof(LV2_Atom) + a->size); } } diff --git a/lv2/lv2plug.in/ns/ext/atom/util.h b/lv2/lv2plug.in/ns/ext/atom/util.h index 97f6dfb..d306e1c 100644 --- a/lv2/lv2plug.in/ns/ext/atom/util.h +++ b/lv2/lv2plug.in/ns/ext/atom/util.h @@ -41,14 +41,14 @@ extern "C" { static inline uint32_t lv2_atom_pad_size(uint32_t size) { - return (size + 7) & (~7); + return (size + 7U) & (~7U); } /** Return the total size of @p atom, including the header. */ static inline uint32_t lv2_atom_total_size(const LV2_Atom* atom) { - return sizeof(LV2_Atom) + atom->size; + return (uint32_t)sizeof(LV2_Atom) + atom->size; } /** Return true iff @p atom is null. */ @@ -207,8 +207,8 @@ lv2_atom_object_next(const LV2_Atom_Property_Body* i) const LV2_Atom* const value = (const LV2_Atom*)( (const uint8_t*)i + 2 * sizeof(uint32_t)); return (LV2_Atom_Property_Body*)( - (const uint8_t*)i + lv2_atom_pad_size(sizeof(LV2_Atom_Property_Body) - + value->size)); + (const uint8_t*)i + lv2_atom_pad_size( + (uint32_t)sizeof(LV2_Atom_Property_Body) + value->size)); } /** |