From 369118b48747b8b3b8eaf14b2e7f51549720d5ab Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 12 Feb 2017 18:01:23 +0100 Subject: Fix various cast alignment warnings --- src/server/ControlBindings.cpp | 8 ++++---- src/server/JackDriver.cpp | 6 +++--- src/server/events/Copy.cpp | 1 - 3 files changed, 7 insertions(+), 8 deletions(-) (limited to 'src/server') diff --git a/src/server/ControlBindings.cpp b/src/server/ControlBindings.cpp index 9e3d2fae..6ae4f856 100644 --- a/src/server/ControlBindings.cpp +++ b/src/server/ControlBindings.cpp @@ -1,6 +1,6 @@ /* This file is part of Ingen. - Copyright 2007-2016 David Robillard + Copyright 2007-2017 David Robillard Ingen is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free @@ -349,11 +349,11 @@ ControlBindings::finish_learn(RunContext& context, Key key) binding->key = key; _bindings->insert(*binding); - uint8_t buf[128]; + LV2_Atom buf[16]; memset(buf, 0, sizeof(buf)); - lv2_atom_forge_set_buffer(&_forge, buf, sizeof(buf)); + lv2_atom_forge_set_buffer(&_forge, (uint8_t*)buf, sizeof(buf)); forge_binding(uris, &_forge, key.type, key.num); - const LV2_Atom* atom = (const LV2_Atom*)buf; + const LV2_Atom* atom = buf; context.notify(uris.midi_binding, context.start(), binding->port, diff --git a/src/server/JackDriver.cpp b/src/server/JackDriver.cpp index c03bf42c..77eb62b3 100644 --- a/src/server/JackDriver.cpp +++ b/src/server/JackDriver.cpp @@ -1,6 +1,6 @@ /* This file is part of Ingen. - Copyright 2007-2016 David Robillard + Copyright 2007-2017 David Robillard Ingen is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free @@ -422,9 +422,9 @@ JackDriver::append_time_events(RunContext& context, _old_bpm = pos->beats_per_minute; // Build an LV2 position object to append to the buffer - uint8_t pos_buf[256]; + LV2_Atom pos_buf[16]; LV2_Atom_Forge_Frame frame; - lv2_atom_forge_set_buffer(&_forge, pos_buf, sizeof(pos_buf)); + lv2_atom_forge_set_buffer(&_forge, (uint8_t*)pos_buf, sizeof(pos_buf)); lv2_atom_forge_object(&_forge, &frame, 0, uris.time_Position); lv2_atom_forge_key(&_forge, uris.time_frame); lv2_atom_forge_long(&_forge, pos->frame); diff --git a/src/server/events/Copy.cpp b/src/server/events/Copy.cpp index 58c9a89c..668a6fca 100644 --- a/src/server/events/Copy.cpp +++ b/src/server/events/Copy.cpp @@ -18,7 +18,6 @@ #include "ingen/Serialiser.hpp" #include "ingen/Store.hpp" #include "raul/Path.hpp" -#include "serd/serd.h" #include "BlockImpl.hpp" #include "Broadcaster.hpp" -- cgit v1.2.1