qt: fix multiple compiler warnings

This commit is contained in:
ts-korhonen
2022-03-07 21:47:48 +02:00
parent fbd29271bc
commit 87546d2ce6
6 changed files with 12 additions and 8 deletions

View File

@@ -339,6 +339,11 @@ bool NewFloppyDialog::create86f(const QString& filename, const disk_size_t& disk
return true; return true;
} }
/* Ignore false positive warning caused by a bug on gcc */
#ifdef __GNUC__
#pragma GCC diagnostic ignored "-Wstringop-overflow"
#endif
bool NewFloppyDialog::createSectorImage(const QString &filename, const disk_size_t& disk_size, FileType type) bool NewFloppyDialog::createSectorImage(const QString &filename, const disk_size_t& disk_size, FileType type)
{ {
uint32_t total_size = 0; uint32_t total_size = 0;

View File

@@ -74,11 +74,13 @@ private:
extern "C" { extern "C" {
#ifdef Q_OS_WINDOWS #ifdef Q_OS_WINDOWS
#define NOMINMAX # ifndef NOMINMAX
#include <windows.h> # define NOMINMAX
#include <86box/win.h> # endif
# include <windows.h>
# include <86box/win.h>
#else #else
#include <strings.h> # include <strings.h>
#endif #endif
#include <86box/86box.h> #include <86box/86box.h>
#include <86box/device.h> #include <86box/device.h>

View File

@@ -218,7 +218,7 @@ SettingsBusTracking::scsi_bus_full()
void void
SettingsBusTracking::device_track(int set, uint8_t dev_type, int bus, int channel) SettingsBusTracking::device_track(int set, uint8_t dev_type, int bus, int channel)
{ {
int i, element; int element;
uint64_t mask; uint64_t mask;
uint8_t count = 0; uint8_t count = 0;

View File

@@ -54,7 +54,6 @@ void SettingsInput::onCurrentMachineChanged(int machineId) {
// win_settings_video_proc, WM_INITDIALOG // win_settings_video_proc, WM_INITDIALOG
this->machineId = machineId; this->machineId = machineId;
const auto* machine = &machines[machineId];
auto* mouseModel = ui->comboBoxMouse->model(); auto* mouseModel = ui->comboBoxMouse->model();
auto removeRows = mouseModel->rowCount(); auto removeRows = mouseModel->rowCount();

View File

@@ -80,7 +80,6 @@ void SettingsNetwork::save() {
void SettingsNetwork::onCurrentMachineChanged(int machineId) { void SettingsNetwork::onCurrentMachineChanged(int machineId) {
this->machineId = machineId; this->machineId = machineId;
auto* machine = &machines[machineId];
auto* model = ui->comboBoxAdapter->model(); auto* model = ui->comboBoxAdapter->model();
auto removeRows = model->rowCount(); auto removeRows = model->rowCount();

View File

@@ -64,7 +64,6 @@ void SettingsStorageControllers::save() {
void SettingsStorageControllers::onCurrentMachineChanged(int machineId) { void SettingsStorageControllers::onCurrentMachineChanged(int machineId) {
this->machineId = machineId; this->machineId = machineId;
auto* machine = &machines[machineId];
/*HD controller config*/ /*HD controller config*/
auto* model = ui->comboBoxHD->model(); auto* model = ui->comboBoxHD->model();