From a3c1c768ef0cc2fc0f2ca50197d09adef09fa68d Mon Sep 17 00:00:00 2001 From: Bill Somerville Date: Wed, 20 Jan 2016 20:32:30 +0000 Subject: [PATCH] Fix some compiler warnings and error Clang++ detected some warnings that g++ did not. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@6409 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- Audio/BWFFile.cpp | 4 ++-- CMakeLists.txt | 3 ++- SampleDownloader/FileNode.hpp | 1 - 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Audio/BWFFile.cpp b/Audio/BWFFile.cpp index c46400394..6ef000535 100644 --- a/Audio/BWFFile.cpp +++ b/Audio/BWFFile.cpp @@ -602,7 +602,7 @@ void BWFFile::bext_time_reference (quint64 time_code) auto BWFFile::bext_umid () const -> UMID { - UMID umid {'\0'}; + UMID umid {{'\0'}}; if (m_->bext ()) { umid = m_->bext ()->umid_; @@ -702,7 +702,7 @@ bool BWFFile::reset () m_->bext_.clear (); auto size = m_->data_size_ < 0 ? m_->file_.size () - m_->header_length_ : m_->data_size_; m_->data_size_ = size; - if (m_->header_length_ > 3 * sizeof (Desc) + 4 + sizeof (FormatChunk)) + if (m_->header_length_ > qint64 (3 * sizeof (Desc) + 4 + sizeof (FormatChunk))) { // we need to move the data down auto old_pos = m_->header_length_; diff --git a/CMakeLists.txt b/CMakeLists.txt index df7e5f16f..6fc84fc4e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -642,9 +642,10 @@ endif (WSJT_GENERATE_DOCS) # set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra") -set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wno-pragmas -std=c++11 -fexceptions -frtti") +set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -std=c++11 -fexceptions -frtti") if (NOT APPLE) + set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-pragmas") set (CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -fdata-sections -ffunction-sections") set (CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL} -fdata-sections -ffunction-sections") set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -fdata-sections -ffunction-sections") diff --git a/SampleDownloader/FileNode.hpp b/SampleDownloader/FileNode.hpp index c6046de72..c34519f15 100644 --- a/SampleDownloader/FileNode.hpp +++ b/SampleDownloader/FileNode.hpp @@ -57,7 +57,6 @@ protected: void download_finished (bool success) override; private: - QNetworkAccessManager * network_manager_; RemoteFile remote_file_; // active download bool block_sync_;