small round of compiler warning fixes

This commit is contained in:
Robin Gareus 2014-10-23 03:32:14 +02:00
parent e2c6eb0ba1
commit c6a3d6bc48
7 changed files with 13 additions and 13 deletions

View file

@ -3601,13 +3601,13 @@ ARDOUR_UI::start_video_server (Gtk::Window* float_window, bool popup_msg)
continue; continue;
} }
#ifndef PLATFORM_WINDOWS #ifndef PLATFORM_WINDOWS
if ( (!g_lstat (icsd_exec.c_str(), &sb) == 0) if ( (g_lstat (icsd_exec.c_str(), &sb) != 0)
|| (sb.st_mode & (S_IXUSR|S_IXGRP|S_IXOTH)) == 0 ) { || (sb.st_mode & (S_IXUSR|S_IXGRP|S_IXOTH)) == 0 ) {
warning << _("Given Video Server is not an executable file.") << endmsg; warning << _("Given Video Server is not an executable file.") << endmsg;
continue; continue;
} }
#else #else
if ( (!g_lstat (icsd_exec.c_str(), &sb) == 0) if ( (g_lstat (icsd_exec.c_str(), &sb) != 0)
|| (sb.st_mode & (S_IXUSR)) == 0 ) { || (sb.st_mode & (S_IXUSR)) == 0 ) {
warning << _("Given Video Server is not an executable file.") << endmsg; warning << _("Given Video Server is not an executable file.") << endmsg;
continue; continue;

View file

@ -810,7 +810,7 @@ EditorRoutes::update_visibility ()
TreeModel::Children rows = _model->children(); TreeModel::Children rows = _model->children();
TreeModel::Children::iterator i; TreeModel::Children::iterator i;
DisplaySuspender ds (); DisplaySuspender ds;
for (i = rows.begin(); i != rows.end(); ++i) { for (i = rows.begin(); i != rows.end(); ++i) {
TimeAxisView *tv = (*i)[_columns.tv]; TimeAxisView *tv = (*i)[_columns.tv];

View file

@ -55,7 +55,7 @@ class Port;
class Session; class Session;
class ProcessThread; class ProcessThread;
class AudioBackend; class AudioBackend;
class AudioBackendInfo; struct AudioBackendInfo;
class LIBARDOUR_API AudioEngine : public SessionHandlePtr, public PortManager class LIBARDOUR_API AudioEngine : public SessionHandlePtr, public PortManager
{ {

View file

@ -87,7 +87,7 @@ public:
int event_size = Evoral::midi_event_size(ev_start); int event_size = Evoral::midi_event_size(ev_start);
assert(event_size >= 0); assert(event_size >= 0);
return EventType(EventTypeMap::instance().midi_event_type(*ev_start), return EventType(EventTypeMap::instance().midi_event_type(*ev_start),
*((TimeType*)(buffer->_data + offset)), *(reinterpret_cast<TimeType*>((uintptr_t)(buffer->_data + offset))),
event_size, ev_start); event_size, ev_start);
} }

View file

@ -190,7 +190,7 @@ MidiBuffer::push_back(TimeType time, size_t size, const uint8_t* data)
} }
uint8_t* const write_loc = _data + _size; uint8_t* const write_loc = _data + _size;
*((TimeType*)write_loc) = time; *(reinterpret_cast<TimeType*>((uintptr_t)write_loc)) = time;
memcpy(write_loc + stamp_size, data, size); memcpy(write_loc + stamp_size, data, size);
_size += stamp_size + size; _size += stamp_size + size;
@ -242,7 +242,7 @@ MidiBuffer::insert_event(const Evoral::MIDIEvent<TimeType>& ev)
} }
uint8_t* const write_loc = _data + insert_offset; uint8_t* const write_loc = _data + insert_offset;
*((TimeType*)write_loc) = t; *(reinterpret_cast<TimeType*>((uintptr_t)write_loc)) = t;
memcpy(write_loc + stamp_size, ev.buffer(), ev.size()); memcpy(write_loc + stamp_size, ev.buffer(), ev.size());
_size += bytes_to_merge; _size += bytes_to_merge;
@ -267,7 +267,7 @@ MidiBuffer::reserve(TimeType time, size_t size)
// write timestamp // write timestamp
uint8_t* write_loc = _data + _size; uint8_t* write_loc = _data + _size;
*((TimeType*)write_loc) = time; *(reinterpret_cast<TimeType*>((uintptr_t)write_loc)) = time;
// move write_loc to begin of MIDI buffer data to write to // move write_loc to begin of MIDI buffer data to write to
write_loc += stamp_size; write_loc += stamp_size;

View file

@ -57,8 +57,8 @@ MidiRingBuffer<T>::read(MidiBuffer& dst, framepos_t start, framepos_t end, frame
*/ */
this->peek (peekbuf, prefix_size); this->peek (peekbuf, prefix_size);
ev_time = *((T*) peekbuf); ev_time = *(reinterpret_cast<T*>((uintptr_t)peekbuf));
ev_size = *((uint32_t*)(peekbuf + sizeof(T) + sizeof (Evoral::EventType))); ev_size = *(reinterpret_cast<uint32_t*>((uintptr_t)(peekbuf + sizeof(T) + sizeof (Evoral::EventType))));
if (ev_time >= end) { if (ev_time >= end) {
DEBUG_TRACE (DEBUG::MidiDiskstreamIO, string_compose ("MRB event @ %1 past end @ %2\n", 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); assert (success);
ev_time = *((T*) peekbuf); ev_time = *(reinterpret_cast<T*>((uintptr_t)peekbuf));
if (ev_time >= end) { if (ev_time >= end) {
break; 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 (prefix_size);
this->increment_read_ptr (ev_size); this->increment_read_ptr (ev_size);
} }

View file

@ -117,8 +117,8 @@ WavesAudioBackend::WavesAudioBackend (AudioEngine& e)
, _sample_time_at_cycle_start (0) , _sample_time_at_cycle_start (0)
, _freewheeling (false) , _freewheeling (false)
, _freewheel_thread_active (false) , _freewheel_thread_active (false)
, _audio_cycle_period_nanos (0)
, _dsp_load_accumulator (0) , _dsp_load_accumulator (0)
, _audio_cycle_period_nanos (0)
, _dsp_load_history_length(0) , _dsp_load_history_length(0)
{ {
} }