Fix warnings

This commit is contained in:
WarmUpTill
2023-09-21 23:18:35 +02:00
committed by WarmUpTill
parent b1489d98f0
commit ac6140b17a
8 changed files with 11 additions and 10 deletions

View File

@@ -119,7 +119,7 @@ void SwitcherData::writeToStatusFile(const QString &msg)
if (file.open(QIODevice::ReadWrite)) {
QTextStream stream(&file);
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
stream << msg << endl;
stream << msg << "\n";
#else
stream << msg << Qt::endl;
#endif

View File

@@ -212,7 +212,7 @@ static inline int
ModelIndexToMacroIndex(int modelIdx,
const std::deque<std::shared_ptr<Macro>> &macros)
{
assert(macros.size() >= modelIdx);
assert((int)macros.size() >= modelIdx);
int realIdx = 0;
const auto &m = macros[0];
bool inCollapsedGroup = m->IsGroup() && m->IsCollapsed();

View File

@@ -920,7 +920,6 @@ QStringList GetAllNotes()
"F#", "G", "G#", "A", "A#", "B"};
for (int octave = -1; octave <= 9; octave++) {
for (int noteIndex = 0; noteIndex < 12; noteIndex++) {
int midiNote = octave * 12 + noteIndex;
result << notes[noteIndex] + QString::number(octave);
}
}

View File

@@ -110,7 +110,7 @@ void TwitchCategorySelection::showPopup()
bool TwitchCategorySelection::IsPopulated()
{
return count() == _categoryGrabber.GetCategories().size() &&
return count() == (int)_categoryGrabber.GetCategories().size() &&
_fetchingCategoriesDone;
}

View File

@@ -120,9 +120,9 @@ void MacroActionTwitch::StartCommercial(
obs_data_array_item(replyArray, 0);
blog(LOG_INFO,
"Failed to start commercial! (%d)\n"
"length: %d\n"
"length: %lld\n"
"message: %s\n"
"retry_after: %d\n",
"retry_after: %lld\n",
result.status, obs_data_get_int(replyData, "length"),
obs_data_get_string(replyData, "message"),
obs_data_get_int(replyData, "retry_after"));

View File

@@ -178,6 +178,9 @@ cv::Mat PreprocessForOCR(const QImage &image, const QColor &textColor,
std::string RunOCR(tesseract::TessBaseAPI *ocr, const QImage &image,
const QColor &color, double colorDiff)
{
(void)ocr;
(void)color;
(void)colorDiff;
if (image.isNull()) {
return "";
}

View File

@@ -112,7 +112,7 @@ void PreviewDialog::Stop()
_thread.wait();
}
void PreviewDialog::closeEvent(QCloseEvent *event)
void PreviewDialog::closeEvent(QCloseEvent *)
{
Stop();
}

View File

@@ -229,7 +229,7 @@ void WSConnection::UseOBSWebsocketProtocol(bool useOBSProtocol)
this, _1, _2));
}
void WSConnection::OnGenericOpen(connection_hdl hdl)
void WSConnection::OnGenericOpen(connection_hdl)
{
blog(LOG_INFO, "connection to %s opened", _uri.c_str());
_status = Status::AUTHENTICATED;
@@ -317,8 +317,7 @@ void WSConnection::HandleResponse(obs_data_t *response)
obs_data_release(data);
}
void WSConnection::OnGenericMessage(connection_hdl hdl,
client::message_ptr message)
void WSConnection::OnGenericMessage(connection_hdl, client::message_ptr message)
{
if (!message) {
return;