Fixes for CLang-specific warnings.
This commit is contained in:
@@ -1082,6 +1082,8 @@ usage:
|
|||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
if (localtime_s(&time_buf, &now) == 0)
|
if (localtime_s(&time_buf, &now) == 0)
|
||||||
info = &time_buf;
|
info = &time_buf;
|
||||||
|
else
|
||||||
|
info = NULL;
|
||||||
#else
|
#else
|
||||||
info = localtime_r(&now, &time_buf);
|
info = localtime_r(&now, &time_buf);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -2073,10 +2073,8 @@ image_load_mds(cd_image_t *img, const char *mdsfile)
|
|||||||
char fn[2048] = { 0 };
|
char fn[2048] = { 0 };
|
||||||
fseek(fp, mds_footer.fn_offs, SEEK_SET);
|
fseek(fp, mds_footer.fn_offs, SEEK_SET);
|
||||||
if (mds_footer.fn_is_wide) {
|
if (mds_footer.fn_is_wide) {
|
||||||
int len = 0;
|
|
||||||
for (int i = 0; i < 256; i++) {
|
for (int i = 0; i < 256; i++) {
|
||||||
fread(&(wfn[i]), 1, 2, fp);
|
fread(&(wfn[i]), 1, 2, fp);
|
||||||
len++;
|
|
||||||
if (wfn[i] == 0x0000)
|
if (wfn[i] == 0x0000)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -197,7 +197,7 @@ MainWindow::MainWindow(QWidget *parent)
|
|||||||
QTimer* frameRateTimer = new QTimer(this);
|
QTimer* frameRateTimer = new QTimer(this);
|
||||||
frameRateTimer->setInterval(1000);
|
frameRateTimer->setInterval(1000);
|
||||||
frameRateTimer->setSingleShot(false);
|
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" : "")));
|
hertz_label->setText(tr("%1 Hz").arg(QString::number(monitors[0].mon_actualrenderedframes.load()) + (monitors[0].mon_interlace ? "i" : "")));
|
||||||
});
|
});
|
||||||
statusBar()->addPermanentWidget(hertz_label);
|
statusBar()->addPermanentWidget(hertz_label);
|
||||||
@@ -306,7 +306,7 @@ MainWindow::MainWindow(QWidget *parent)
|
|||||||
|
|
||||||
connect(this, &MainWindow::showMessageForNonQtThread, this, &MainWindow::showMessage_, Qt::QueuedConnection);
|
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) {
|
if (dopause && !hide_tool_bar) {
|
||||||
toolbar_label->setText(toolbar_label->text() + tr(" - PAUSED"));
|
toolbar_label->setText(toolbar_label->text() + tr(" - PAUSED"));
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -147,7 +147,7 @@ VMManagerMain::VMManagerMain(QWidget *parent) :
|
|||||||
connect(buttonBox, &QDialogButtonBox::accepted, &dialog, &QDialog::accept);
|
connect(buttonBox, &QDialogButtonBox::accepted, &dialog, &QDialog::accept);
|
||||||
connect(buttonBox, &QDialogButtonBox::rejected, &dialog, &QDialog::reject);
|
connect(buttonBox, &QDialogButtonBox::rejected, &dialog, &QDialog::reject);
|
||||||
layout->addWidget(buttonBox);
|
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;
|
bool isSpaceOnly = true;
|
||||||
#ifdef Q_OS_WINDOWS
|
#ifdef Q_OS_WINDOWS
|
||||||
const char illegalChars[] = "<>:\"|?*\\/";
|
const char illegalChars[] = "<>:\"|?*\\/";
|
||||||
@@ -218,7 +218,7 @@ illegal_chars:
|
|||||||
QString srcPath = selected_sysconfig->config_dir;
|
QString srcPath = selected_sysconfig->config_dir;
|
||||||
QString dstPath = vmDir;
|
QString dstPath = vmDir;
|
||||||
|
|
||||||
std::thread copyThread([this, &finished, srcPath, dstPath, &errCode] {
|
std::thread copyThread([&finished, srcPath, dstPath, &errCode] {
|
||||||
errCode = copyPath(srcPath, dstPath, true);
|
errCode = copyPath(srcPath, dstPath, true);
|
||||||
finished = true;
|
finished = true;
|
||||||
});
|
});
|
||||||
@@ -285,7 +285,7 @@ illegal_chars:
|
|||||||
|
|
||||||
QAction deleteAction(tr("&Delete"));
|
QAction deleteAction(tr("&Delete"));
|
||||||
contextMenu.addAction(&deleteAction);
|
contextMenu.addAction(&deleteAction);
|
||||||
connect(&deleteAction, &QAction::triggered, [this, parent] {
|
connect(&deleteAction, &QAction::triggered, [this] {
|
||||||
deleteSystem(selected_sysconfig);
|
deleteSystem(selected_sysconfig);
|
||||||
});
|
});
|
||||||
deleteAction.setEnabled(selected_sysconfig->process->state() == QProcess::NotRunning);
|
deleteAction.setEnabled(selected_sysconfig->process->state() == QProcess::NotRunning);
|
||||||
|
|||||||
@@ -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))
|
if ((svga->crtcreg == 7) && ((svga->crtc[0x11] & 0x80) || (mach->regs[0xb4] & 0x40)) && !(mach->regs[0xb4] & 0x80))
|
||||||
val = (svga->crtc[7] & ~0x10) | (val & 0x10);
|
val = (svga->crtc[7] & ~0x10) | (val & 0x10);
|
||||||
if (mach->regs[0xb8] & 0x04) {
|
if (mach->regs[0xb8] & 0x04) {
|
||||||
if ((svga->crtcreg < 0x0a) && (svga->crtcreg > 0x0d))
|
if ((svga->crtcreg < 0x0a) || (svga->crtcreg > 0x0d))
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (mach->regs[0xb4] & 0x04) {
|
if (mach->regs[0xb4] & 0x04) {
|
||||||
|
|||||||
Reference in New Issue
Block a user