From fa2ad12f40b86d3eb6204bde865d7a14c7761415 Mon Sep 17 00:00:00 2001 From: Vadim Kuznetzov Date: Fri, 12 Sep 2014 10:24:09 +0400 Subject: [PATCH] Added -Wall option for cmake build system, fixed some warnings, corrected *.pro file for qmake build system --- qucs-activefilter/CMakeLists.txt | 2 ++ qucs-activefilter/mfbfilter.cpp | 2 +- qucs-activefilter/qucsactivefilter.pro | 7 +++++-- qucs-activefilter/sallenkey.cpp | 8 ++++++++ qucs-activefilter/schcauer.cpp | 1 - 5 files changed, 16 insertions(+), 4 deletions(-) diff --git a/qucs-activefilter/CMakeLists.txt b/qucs-activefilter/CMakeLists.txt index c745263c..b4f5dadc 100644 --- a/qucs-activefilter/CMakeLists.txt +++ b/qucs-activefilter/CMakeLists.txt @@ -15,6 +15,8 @@ SET(CMAKE_BUILD_TYPE Debug) ADD_DEFINITIONS( -DHAVE_CONFIG_H ) +SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall ") + # define variables SET(BINARYDIR "${CMAKE_INSTALL_PREFIX}/bin/") SET(BITMAPDIR "${CMAKE_INSTALL_PREFIX}/share/qucs/bitmaps/") diff --git a/qucs-activefilter/mfbfilter.cpp b/qucs-activefilter/mfbfilter.cpp index c13e682d..bf937d63 100644 --- a/qucs-activefilter/mfbfilter.cpp +++ b/qucs-activefilter/mfbfilter.cpp @@ -435,7 +435,7 @@ void MFBfilter::calcBandPass() if (order%2 != 0) { // Need to implement first-order section - float R1,R2,R3,R4,C1; + float R1,R2,R3,C1; int k = order/2 + 1; float re = Poles.at(k-1).real(); diff --git a/qucs-activefilter/qucsactivefilter.pro b/qucs-activefilter/qucsactivefilter.pro index fbce323a..e8d13b94 100644 --- a/qucs-activefilter/qucsactivefilter.pro +++ b/qucs-activefilter/qucsactivefilter.pro @@ -11,6 +11,7 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets TARGET = qucsactivefilter TEMPLATE = app +DEFINES += HAVE_CONFIG_H SOURCES += main.cpp\ filter.cpp \ @@ -19,7 +20,8 @@ SOURCES += main.cpp\ qf_poly.cpp \ schcauer.cpp \ transferfuncdialog.cpp \ - qucsactivefilter.cpp + qucsactivefilter.cpp \ + helpdialog.cpp HEADERS += \ filter.h \ @@ -30,7 +32,8 @@ HEADERS += \ schcauer.h \ transferfuncdialog.h \ bessel.h \ - qucsactivefilter.h + qucsactivefilter.h \ + helpdialog.h RESOURCES += \ qucsactivefilter.qrc diff --git a/qucs-activefilter/sallenkey.cpp b/qucs-activefilter/sallenkey.cpp index 479cc2e9..f5dfe3e2 100644 --- a/qucs-activefilter/sallenkey.cpp +++ b/qucs-activefilter/sallenkey.cpp @@ -148,6 +148,8 @@ void SallenKey::calcBandPass() current_section.R2 = 1000*R2; current_section.R3 = 1000*R3; current_section.R4 = 1000*R4; + current_section.R5 = 0; + current_section.R6 = 0; current_section.C1 = C1; current_section.C2 = C1; Sections.append(current_section); @@ -184,6 +186,8 @@ void SallenKey::calcBandPass() current_section.R2 = 1000*R2; current_section.R3 = 1000*R3; current_section.R4 = 1000*R4; + current_section.R5 = 0; + current_section.R6 = 0; current_section.C1 = C1; current_section.C2 = C1; Sections.append(current_section); @@ -203,6 +207,8 @@ void SallenKey::calcBandPass() current_section.R2 = 1000*R2; current_section.R3 = 1000*R3; current_section.R4 = 1000*R4; + current_section.R5 = 0; + current_section.R6 = 0; current_section.C1 = C1; current_section.C2 = C1; Sections.append(current_section); @@ -234,6 +240,8 @@ void SallenKey::calcBandPass() current_section.R2 = 1000*R2; current_section.R3 = 1000*R3; current_section.R4 = 1000*R4; + current_section.R5 = 0; + current_section.R6 = 0; current_section.C1 = C1; current_section.C2 = C1; Sections.append(current_section); diff --git a/qucs-activefilter/schcauer.cpp b/qucs-activefilter/schcauer.cpp index 494896c3..00384f8e 100644 --- a/qucs-activefilter/schcauer.cpp +++ b/qucs-activefilter/schcauer.cpp @@ -258,7 +258,6 @@ void SchCauer::calcBandStop() R4 = Kv1*R5/mu; R6 = mu*R2/(mu-1.0); - current_section; current_section.N = cnt; current_section.R1 = 1000*R1; current_section.R2 = 1000*R2;