Fix some warnings

This commit is contained in:
Jean Pierre Cimalando 2021-04-11 19:40:33 +02:00
parent 86d82060ad
commit 5e063e2c1a
5 changed files with 7 additions and 4 deletions

View file

@ -221,7 +221,7 @@ absl::optional<fs::path> getSfzConfigDefaultPath()
fs::path path = fs::u8path(settings.load_or("user_files_dir", {}));
if (path.empty() || !path.is_absolute())
return {};
return std::move(path);
return path;
}
void setSfzConfigDefaultPath(const fs::path& path)

View file

@ -45,6 +45,7 @@ fs::path getAriaPathSetting(const char* name)
#else
fs::path getAriaPathSetting(const char* name)
{
(void)name;
return {};
}
#endif

View file

@ -5,7 +5,9 @@
// If not, contact the sfizz maintainers at https://github.com/sfztools/sfizz
#pragma once
#include "utility/vstgui_before.h"
#include "vstgui/lib/ccolor.h"
#include "utility/vstgui_after.h"
using namespace VSTGUI;

View file

@ -303,7 +303,7 @@ tresult SfizzVstControllerNoUi::notify(Vst::IMessage* message)
const uint8* pos = reinterpret_cast<const uint8*>(data);
const uint8* end = pos + size;
while (end - pos >= sizeof(uint32) + sizeof(float)) {
while (static_cast<size_t>(end - pos) >= sizeof(uint32) + sizeof(float)) {
Vst::ParamID pid = *reinterpret_cast<const uint32*>(pos);
pos += sizeof(uint32);
float value = *reinterpret_cast<const float*>(pos);

View file

@ -46,8 +46,8 @@ static const char* kMsgIdNoteEvents = "NoteEvents";
static constexpr std::chrono::milliseconds kBackgroundIdleInterval { 50 };
SfizzVstProcessor::SfizzVstProcessor()
: _fifoToWorker(64 * 1024), _fifoMessageFromUi(64 * 1024),
_oscTemp(new uint8_t[kOscTempSize])
: _oscTemp(new uint8_t[kOscTempSize]),
_fifoToWorker(64 * 1024), _fifoMessageFromUi(64 * 1024)
{
setControllerClass(SfizzVstController::cid);