1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Linux: Fix some cast warnings

This commit is contained in:
reuk 2020-09-06 16:22:31 +01:00
parent 90664b42df
commit 49588b704e
3 changed files with 6 additions and 6 deletions

View file

@ -588,10 +588,10 @@ private:
{
Steinberg::Vst::Event e{};
e.type = Steinberg::Vst::Event::kLegacyMIDICCOutEvent;
e.midiCCOut.channel = int8 (createSafeChannel (channel));
e.midiCCOut.channel = Steinberg::int8 (createSafeChannel (channel));
e.midiCCOut.controlNumber = uint8 (jlimit (0, 255, controlNumber));
e.midiCCOut.value = int8 (createSafeNote (value));
e.midiCCOut.value2 = int8 (createSafeNote (value2));
e.midiCCOut.value = Steinberg::int8 (createSafeNote (value));
e.midiCCOut.value2 = Steinberg::int8 (createSafeNote (value2));
return e;
}

View file

@ -215,8 +215,8 @@ double Time::getMillisecondCounterHiRes() noexcept
bool Time::setSystemTimeToThisTime() const
{
timeval t;
t.tv_sec = millisSinceEpoch / 1000;
t.tv_usec = (millisSinceEpoch - t.tv_sec * 1000) * 1000;
t.tv_sec = decltype (timeval::tv_sec) (millisSinceEpoch / 1000);
t.tv_usec = decltype (timeval::tv_usec) ((millisSinceEpoch - t.tv_sec * 1000) * 1000);
return settimeofday (&t, nullptr) == 0;
}

View file

@ -198,7 +198,7 @@ public:
srcMimeTypeAtomList.clear();
dragAndDropCurrentMimeType = 0;
auto dndCurrentVersion = static_cast<unsigned long> (clientMsg.data.l[1] & 0xff000000) >> 24;
auto dndCurrentVersion = (static_cast<unsigned long> (clientMsg.data.l[1]) & 0xff000000) >> 24;
if (dndCurrentVersion < 3 || dndCurrentVersion > XWindowSystemUtilities::Atoms::DndVersion)
{