diff options
author | Robin Gareus <robin@gareus.org> | 2014-10-23 03:32:14 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2014-10-23 03:43:04 +0200 |
commit | c6a3d6bc48ea766a55d0b848d7bff16daa013b41 (patch) | |
tree | b1255e14d3b42220582935f06e7c9846c4f6d535 /libs/ardour/midi_ring_buffer.cc | |
parent | e2c6eb0ba1948fa5b39216618f8e8d9fdbad30b0 (diff) |
small round of compiler warning fixes
Diffstat (limited to 'libs/ardour/midi_ring_buffer.cc')
-rw-r--r-- | libs/ardour/midi_ring_buffer.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libs/ardour/midi_ring_buffer.cc b/libs/ardour/midi_ring_buffer.cc index e4ae3f3ffe..555ac6fb96 100644 --- a/libs/ardour/midi_ring_buffer.cc +++ b/libs/ardour/midi_ring_buffer.cc @@ -57,8 +57,8 @@ MidiRingBuffer<T>::read(MidiBuffer& dst, framepos_t start, framepos_t end, frame */ this->peek (peekbuf, prefix_size); - ev_time = *((T*) peekbuf); - ev_size = *((uint32_t*)(peekbuf + sizeof(T) + sizeof (Evoral::EventType))); + ev_time = *(reinterpret_cast<T*>((uintptr_t)peekbuf)); + ev_size = *(reinterpret_cast<uint32_t*>((uintptr_t)(peekbuf + sizeof(T) + sizeof (Evoral::EventType)))); if (ev_time >= end) { DEBUG_TRACE (DEBUG::MidiDiskstreamIO, string_compose ("MRB event @ %1 past end @ %2\n", ev_time, end)); @@ -148,13 +148,13 @@ MidiRingBuffer<T>::flush (framepos_t /*start*/, framepos_t end) */ assert (success); - ev_time = *((T*) peekbuf); + ev_time = *(reinterpret_cast<T*>((uintptr_t)peekbuf)); if (ev_time >= end) { break; } - ev_size = *((uint32_t*)(peekbuf + sizeof(T) + sizeof (Evoral::EventType))); + ev_size = *(reinterpret_cast<uint32_t*>((uintptr_t)(peekbuf + sizeof(T) + sizeof (Evoral::EventType)))); this->increment_read_ptr (prefix_size); this->increment_read_ptr (ev_size); } |