From 1afc8f6709c8aa4ff1bd585cc930743399160105 Mon Sep 17 00:00:00 2001 From: Ake Hedman Date: Wed, 25 Sep 2024 17:43:09 +0200 Subject: [PATCH] Fixed some build problems on Windows --- CMakeLists.txt | 2 ++ src/bootloaderwizard.cpp | 2 +- src/cfrmsession.cpp | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cf4800c6..dcb9f685 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -72,6 +72,8 @@ if(MSVC) add_definitions(-DWIN32_LEAN_AND_MEANS) add_definitions(-D_POSIX_C_SOURCE) add_definitions(-DVCPKG_TARGET_TRIPLET=x64-windows) + add_definitions(-D_SILENCE_STDEXT_ARR_ITERS_DEPRECATION_WARNING) + add_definitions(-D_SILENCE_ALL_MS_EXT_DEPRECATION_WARNINGS) set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) set(LIBS_SYSTEM ws2_32) elseif(UNIX) diff --git a/src/bootloaderwizard.cpp b/src/bootloaderwizard.cpp index 1df1119f..3cc507c8 100644 --- a/src/bootloaderwizard.cpp +++ b/src/bootloaderwizard.cpp @@ -568,7 +568,7 @@ CWizardPageLoadMdf::isComplete(void) const bool CWizardPageLoadMdf::validatePage(void) { - int rv; + //int rv; vscpworks* pworks = (vscpworks*)QCoreApplication::instance(); switch (m_vscpClient->getType()) { diff --git a/src/cfrmsession.cpp b/src/cfrmsession.cpp index 05440b4b..72311e51 100644 --- a/src/cfrmsession.cpp +++ b/src/cfrmsession.cpp @@ -1905,7 +1905,7 @@ CFrmSession::saveTxEvents(const QString& path, bool bSelected) stream.writeStartElement("txrows"); - if (selection.size() & bSelected) { + if ((0 != selection.size()) & bSelected) { // Save selected items QList::iterator it;