aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniil Cherednik <dan.cherednik@gmail.com>2015-12-26 03:13:41 +0300
committerDaniil Cherednik <dan.cherednik@gmail.com>2015-12-26 03:13:41 +0300
commit7b4f49be99f5ef669c1a268cec5858854b45bd1f (patch)
tree00d23c4371a076d4d30e2c2721c69db4ce63afa1
parent2cbfd7920c72d5288eb3bf579a0fd85460bd735e (diff)
downloadatracdenc-7b4f49be99f5ef669c1a268cec5858854b45bd1f.tar.gz
Some warnings fixed, -Wall enabled
-rw-r--r--src/CMakeLists.txt2
-rw-r--r--src/aea.h4
-rw-r--r--src/atrac/atrac1.h3
-rw-r--r--src/atracdenc.cpp2
-rw-r--r--src/atracdenc.h3
-rw-r--r--src/mdct/mdct.h8
-rw-r--r--src/qmf/qmf.h1
7 files changed, 10 insertions, 13 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index cc8f931..cd7daec 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,6 +1,6 @@
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
-add_definitions( "-O2 -g" )
+add_definitions( "-Wall -O2 -g" )
set(CMAKE_CXX_STANDARD 11)
project(atracdenc)
diff --git a/src/aea.h b/src/aea.h
index a5af1b8..bbd3f17 100644
--- a/src/aea.h
+++ b/src/aea.h
@@ -14,7 +14,9 @@ public:
TAeaIOError(const char* str, int err)
: ErrNum(err)
, Text(str)
- {}
+ {
+ (void)ErrNum; //TODO: use it
+ }
virtual const char* what() const throw() {
return Text;
}
diff --git a/src/atrac/atrac1.h b/src/atrac/atrac1.h
index c4f349f..e372ac3 100644
--- a/src/atrac/atrac1.h
+++ b/src/atrac/atrac1.h
@@ -69,9 +69,6 @@ public:
TBlockSize(NBitStream::TBitStream* stream)
: LogCount(Parse(stream))
{}
- TBlockSize()
- : LogCount({0,0,0}) //windows are long
- {}
TBlockSize(bool lowShort, bool midShort, bool hiShort)
: LogCount(Create(lowShort, midShort, hiShort))
{}
diff --git a/src/atracdenc.cpp b/src/atracdenc.cpp
index 2ee5918..98c741e 100644
--- a/src/atracdenc.cpp
+++ b/src/atracdenc.cpp
@@ -26,6 +26,7 @@ TAtrac1Processor::TAtrac1Processor(TAeaPtr&& aea, bool mono)
: MixChannel(mono)
, Aea(std::move(aea))
{
+ (void)MixChannel; //TODO
}
static void vector_fmul_window(double *dst, const double *src0,
@@ -156,7 +157,6 @@ TPCMEngine<double>::TProcessLambda TAtrac1Processor::GetDecodeLambda() {
IMdct(&specs[0], mode, &PcmBufLow[channel][0], &PcmBufMid[channel][0], &PcmBufHi[channel][0]);
SynthesisFilterBank[channel].Synthesis(&sum[0], &PcmBufLow[channel][0], &PcmBufMid[channel][0], &PcmBufHi[channel][0]);
- const int numChannel = data[0].size();
for (int i = 0; i < NumSamples; ++i) {
data[i][srcChannels - 1-channel] = sum[i];
}
diff --git a/src/atracdenc.h b/src/atracdenc.h
index 9695bc1..8a50cf1 100644
--- a/src/atracdenc.h
+++ b/src/atracdenc.h
@@ -34,11 +34,10 @@ public:
};
class TAtrac1Processor : public TAtrac1MDCT, public virtual TAtrac1Data {
- const bool MixChannel;
+ bool MixChannel;
TAeaPtr Aea;
double PcmBufLow[2][256 + 16];
- double PcmBufLowT[2][256 + 16];
double PcmBufMid[2][256 + 16];
double PcmBufHi[2][512 + 16];
diff --git a/src/mdct/mdct.h b/src/mdct/mdct.h
index cbb842f..ced049c 100644
--- a/src/mdct/mdct.h
+++ b/src/mdct/mdct.h
@@ -22,8 +22,8 @@ class TMDCT : public TMDCTBase {
std::vector<double> Buf;
public:
TMDCT(float scale = 1.0)
- : Buf(N/2)
- , TMDCTBase(N, scale)
+ : TMDCTBase(N, scale)
+ , Buf(N/2)
{}
const std::vector<double>& operator()(double* in) {
mdct(&Ctx, &Buf[0], in);
@@ -36,8 +36,8 @@ class TMIDCT : public TMDCTBase {
std::vector<double> Buf;
public:
TMIDCT(float scale = 1.0)
- : Buf(N)
- , TMDCTBase(N, scale)
+ : TMDCTBase(N, scale)
+ , Buf(N)
{}
const std::vector<double>& operator()(double* in) {
midct(&Ctx, &Buf[0], in);
diff --git a/src/qmf/qmf.h b/src/qmf/qmf.h
index 0a98e1b..11e23ee 100644
--- a/src/qmf/qmf.h
+++ b/src/qmf/qmf.h
@@ -23,7 +23,6 @@ public:
void Split(TPCM* in, double* lower, double* upper) {
double temp;
- static double last;
for (int i = 0; i < 46; i++)
PcmBuffer[i] = PcmBuffer[nIn + i];