diff --git a/src/86box.c b/src/86box.c index 07dcbaf83..36638687a 100644 --- a/src/86box.c +++ b/src/86box.c @@ -1082,6 +1082,8 @@ usage: #ifdef _WIN32 if (localtime_s(&time_buf, &now) == 0) info = &time_buf; + else + info = NULL; #else info = localtime_r(&now, &time_buf); #endif diff --git a/src/cdrom/cdrom_image.c b/src/cdrom/cdrom_image.c index 81fadb272..ac4d067b5 100644 --- a/src/cdrom/cdrom_image.c +++ b/src/cdrom/cdrom_image.c @@ -2073,10 +2073,8 @@ image_load_mds(cd_image_t *img, const char *mdsfile) char fn[2048] = { 0 }; fseek(fp, mds_footer.fn_offs, SEEK_SET); if (mds_footer.fn_is_wide) { - int len = 0; for (int i = 0; i < 256; i++) { fread(&(wfn[i]), 1, 2, fp); - len++; if (wfn[i] == 0x0000) break; } diff --git a/src/qt/qt_mainwindow.cpp b/src/qt/qt_mainwindow.cpp index 3b8bee2f0..7f611b9da 100644 --- a/src/qt/qt_mainwindow.cpp +++ b/src/qt/qt_mainwindow.cpp @@ -197,7 +197,7 @@ MainWindow::MainWindow(QWidget *parent) QTimer* frameRateTimer = new QTimer(this); frameRateTimer->setInterval(1000); frameRateTimer->setSingleShot(false); - connect(frameRateTimer, &QTimer::timeout, [this, hertz_label] { + connect(frameRateTimer, &QTimer::timeout, [hertz_label] { hertz_label->setText(tr("%1 Hz").arg(QString::number(monitors[0].mon_actualrenderedframes.load()) + (monitors[0].mon_interlace ? "i" : ""))); }); statusBar()->addPermanentWidget(hertz_label); @@ -306,7 +306,7 @@ MainWindow::MainWindow(QWidget *parent) connect(this, &MainWindow::showMessageForNonQtThread, this, &MainWindow::showMessage_, Qt::QueuedConnection); - connect(this, &MainWindow::setTitle, this, [this, toolbar_label](const QString &title) { + connect(this, &MainWindow::setTitle, this, [toolbar_label](const QString &title) { if (dopause && !hide_tool_bar) { toolbar_label->setText(toolbar_label->text() + tr(" - PAUSED")); return; diff --git a/src/qt/qt_vmmanager_main.cpp b/src/qt/qt_vmmanager_main.cpp index f55c90389..c1f31824c 100644 --- a/src/qt/qt_vmmanager_main.cpp +++ b/src/qt/qt_vmmanager_main.cpp @@ -147,7 +147,7 @@ VMManagerMain::VMManagerMain(QWidget *parent) : connect(buttonBox, &QDialogButtonBox::accepted, &dialog, &QDialog::accept); connect(buttonBox, &QDialogButtonBox::rejected, &dialog, &QDialog::reject); layout->addWidget(buttonBox); - connect(edit, &QLineEdit::textChanged, this, [this, errLabel, buttonBox] (const QString& text) { + connect(edit, &QLineEdit::textChanged, this, [errLabel, buttonBox] (const QString& text) { bool isSpaceOnly = true; #ifdef Q_OS_WINDOWS const char illegalChars[] = "<>:\"|?*\\/"; @@ -218,7 +218,7 @@ illegal_chars: QString srcPath = selected_sysconfig->config_dir; QString dstPath = vmDir; - std::thread copyThread([this, &finished, srcPath, dstPath, &errCode] { + std::thread copyThread([&finished, srcPath, dstPath, &errCode] { errCode = copyPath(srcPath, dstPath, true); finished = true; }); @@ -285,7 +285,7 @@ illegal_chars: QAction deleteAction(tr("&Delete")); contextMenu.addAction(&deleteAction); - connect(&deleteAction, &QAction::triggered, [this, parent] { + connect(&deleteAction, &QAction::triggered, [this] { deleteSystem(selected_sysconfig); }); deleteAction.setEnabled(selected_sysconfig->process->state() == QProcess::NotRunning); diff --git a/src/video/vid_ati_mach8.c b/src/video/vid_ati_mach8.c index e0d66f5cc..24293ab1d 100644 --- a/src/video/vid_ati_mach8.c +++ b/src/video/vid_ati_mach8.c @@ -2475,7 +2475,7 @@ mach_out(uint16_t addr, uint8_t val, void *priv) if ((svga->crtcreg == 7) && ((svga->crtc[0x11] & 0x80) || (mach->regs[0xb4] & 0x40)) && !(mach->regs[0xb4] & 0x80)) val = (svga->crtc[7] & ~0x10) | (val & 0x10); if (mach->regs[0xb8] & 0x04) { - if ((svga->crtcreg < 0x0a) && (svga->crtcreg > 0x0d)) + if ((svga->crtcreg < 0x0a) || (svga->crtcreg > 0x0d)) return; } if (mach->regs[0xb4] & 0x04) {