if (icsd_docroot.empty()) {icsd_docroot = X_("/");}
GStatBuf sb;
- if (!g_lstat (icsd_docroot.c_str(), &sb) == 0 || !S_ISDIR(sb.st_mode)) {
+ if (g_lstat (icsd_docroot.c_str(), &sb) != 0 || !S_ISDIR(sb.st_mode)) {
warning << _("Specified docroot is not an existing directory.") << endmsg;
continue;
}
return (xjadeo_settings[k]);
}
-#define NO_OFFSET (1<<63) //< skip setting or modifying offset
+#define NO_OFFSET (ARDOUR::max_framepos) //< skip setting or modifying offset
void
VideoMonitor::srsupdate ()
{
}
inline TimeType * timeptr() {
- return ((TimeType*)(buffer->_data + offset));
+ return reinterpret_cast<TimeType*>((uintptr_t)(buffer->_data + offset));
}
inline iterator_base<BufferType, EventType>& operator++() {
char buf[32];
#ifdef __APPLE__
- snprintf (buf, sizeof (buf), "%u-%u-%d.peak", stat_mount.st_ino, stat_file.st_ino, _channel);
+ snprintf (buf, sizeof (buf), "%llu-%llu-%d.peak",
+ (unsigned long long)stat_mount.st_ino,
+ (unsigned long long)stat_file.st_ino,
+ _channel);
#else
snprintf (buf, sizeof (buf), "%" PRId64 "-%" PRId64 "-%d.peak", (int64_t) stat_mount.st_ino, (int64_t) stat_file.st_ino, _channel);
#endif
uint32_t size;
switch (evbuf->type) {
case LV2_EVBUF_EVENT:
- size = ((LV2_Event*)(evbuf->buf.event.data + offset))->size;
+ size = ((LV2_Event*)((uintptr_t)(evbuf->buf.event.data + offset)))->size;
offset += lv2_evbuf_pad_size(sizeof(LV2_Event) + size);
break;
case LV2_EVBUF_ATOM:
- size = ((LV2_Atom_Event*)
+ size = ((LV2_Atom_Event*)((uintptr_t)
((char*)LV2_ATOM_CONTENTS(LV2_Atom_Sequence, &evbuf->buf.atom)
- + offset))->body.size;
+ + offset)))->body.size;
offset += lv2_evbuf_pad_size(sizeof(LV2_Atom_Event) + size);
break;
}
switch (iter.evbuf->type) {
case LV2_EVBUF_EVENT:
ebuf = &iter.evbuf->buf.event;
- ev = (LV2_Event*)((char*)ebuf->data + iter.offset);
+ ev = (LV2_Event*)((uintptr_t)((char*)ebuf->data + iter.offset));
*frames = ev->frames;
*subframes = ev->subframes;
*type = ev->type;
break;
case LV2_EVBUF_ATOM:
aseq = (LV2_Atom_Sequence*)&iter.evbuf->buf.atom;
- aev = (LV2_Atom_Event*)(
+ aev = (LV2_Atom_Event*)((uintptr_t)(
(char*)LV2_ATOM_CONTENTS(LV2_Atom_Sequence, aseq)
- + iter.offset);
+ + iter.offset));
*frames = aev->time.frames;
*subframes = 0;
*type = aev->body.type;
return false;
}
- ev = (LV2_Event*)(ebuf->data + iter->offset);
+ ev = (LV2_Event*)((uintptr_t)(ebuf->data + iter->offset));
ev->frames = frames;
ev->subframes = subframes;
ev->type = type;
return false;
}
- aev = (LV2_Atom_Event*)(
+ aev = (LV2_Atom_Event*)((uintptr_t)(
(char*)LV2_ATOM_CONTENTS(LV2_Atom_Sequence, aseq)
- + iter->offset);
+ + iter->offset));
aev->time.frames = frames;
aev->body.type = type;
aev->body.size = size;
cerr << "drop flushed event on the floor, time " << ev.time()
<< " too early for " << _global_port_buffer_offset
<< " + " << _port_buffer_offset;
- for (int xx = 0; xx < ev.size(); ++xx) {
+ for (size_t xx = 0; xx < ev.size(); ++xx) {
cerr << ' ' << hex << (int) ev.buffer()[xx];
}
cerr << dec << endl;
#include "windows.h"
#include "mmsystem.h"
-#else if defined(__APPLE__)
+#elif defined(__APPLE__)
#include <CoreMIDI/MIDIServices.h>
/* Process incoming MIDI events */
if (self->midiin) {
- LV2_Atom_Event const* ev = (LV2_Atom_Event const*)((&(self->midiin)->body) + 1); // lv2_atom_sequence_begin
+ LV2_Atom_Event const* ev = (LV2_Atom_Event const*)((uintptr_t)((&(self->midiin)->body) + 1)); // lv2_atom_sequence_begin
while( // !lv2_atom_sequence_is_end
(const uint8_t*)ev < ((const uint8_t*) &(self->midiin)->body + (self->midiin)->atom.size)
)
}
}
ev = (LV2_Atom_Event const*) // lv2_atom_sequence_next()
- ((const uint8_t*)ev + sizeof(LV2_Atom_Event) + ((ev->body.size + 7) & ~7));
+ ((uintptr_t)((const uint8_t*)ev + sizeof(LV2_Atom_Event) + ((ev->body.size + 7) & ~7)));
}
}