aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniil Cherednik <dan.cherednik@gmail.com>2023-09-10 22:15:50 +0200
committerDaniil Cherednik <dan.cherednik@gmail.com>2023-09-10 22:15:50 +0200
commit9c0dbf84006b7219ef7e05ef324ae9c05d78a8c7 (patch)
treea7287afd553b27318652e08b2e112e5099bc1897
parentf0456e6642047976b407a80cafec3ccb473e3332 (diff)
downloadatracdenc-9c0dbf84006b7219ef7e05ef324ae9c05d78a8c7.tar.gz
Fix warnings
-rw-r--r--src/atrac1denc.h3
-rw-r--r--src/atrac3denc.cpp2
-rw-r--r--src/env.cpp4
-rw-r--r--src/rm.cpp4
4 files changed, 5 insertions, 8 deletions
diff --git a/src/atrac1denc.h b/src/atrac1denc.h
index 802978d..f171bf5 100644
--- a/src/atrac1denc.h
+++ b/src/atrac1denc.h
@@ -64,9 +64,6 @@ class TAtrac1Encoder : public IProcessor<TFloat>, public TAtrac1MDCT, public vir
TFloat PcmBufMid[2][256 + 16];
TFloat PcmBufHi[2][512 + 16];
- int32_t PcmValueMax = 1;
- int32_t PcmValueMin = -1;
-
Atrac1SplitFilterBank<TFloat> SplitFilterBank[2];
class TTransientDetectors {
diff --git a/src/atrac3denc.cpp b/src/atrac3denc.cpp
index 1208963..29db54a 100644
--- a/src/atrac3denc.cpp
+++ b/src/atrac3denc.cpp
@@ -213,7 +213,7 @@ void TAtrac3Encoder::CreateSubbandInfo(TFloat* in[4],
TAtrac3Data::SubbandInfo* subbandInfo)
{
- auto relToIdx = [this](TFloat rel) {
+ auto relToIdx = [](TFloat rel) {
rel = 1.0/rel;
return (uint32_t)(RelationToIdx(rel));
};
diff --git a/src/env.cpp b/src/env.cpp
index b5d2a5b..fbb0e5e 100644
--- a/src/env.cpp
+++ b/src/env.cpp
@@ -20,7 +20,7 @@
#include <fenv.h>
-#pragma STDC FENV_ACCESS on
+#pragma STDC FENV_ACCESS ON
namespace NEnv {
@@ -28,4 +28,4 @@ void SetRoundFloat() {
fesetround(FE_TONEAREST);
}
-} // namespace NEnv \ No newline at end of file
+} // namespace NEnv
diff --git a/src/rm.cpp b/src/rm.cpp
index 656cbd7..dc41743 100644
--- a/src/rm.cpp
+++ b/src/rm.cpp
@@ -59,7 +59,7 @@ void WriteRMF(FILE* f) {
constexpr size_t CODEC_DATA_SZ = 92;
constexpr char RA_MIME[] = "audio/x-pn-realaudio";
constexpr char RA_DESC[] = "Audio Stream";
-static_assert(sizeof(char) == 1);
+static_assert(sizeof(char) == 1, "unexpected char size");
constexpr size_t MDPR_HEADER_SZ = 42 + sizeof(RA_MIME) + sizeof(RA_DESC) + CODEC_DATA_SZ;
void FillCodecData(char* buf, uint32_t frameSize, uint8_t numChannels, bool jointStereo, uint32_t bitrate) {
@@ -136,7 +136,7 @@ void scramble_data(const char* input, char* out, size_t bytes) {
const uint32_t* buf = reinterpret_cast<const uint32_t*>(input);
uint32_t* o = reinterpret_cast<uint32_t*>(out);
uint32_t c = swapbyte32_on_le(0x537F6103U);
- static_assert(sizeof(uint32_t) / sizeof(char) == 4);
+ static_assert(sizeof(uint32_t) / sizeof(char) == 4, "unexpected uint32_t size");
for (size_t i = 0; i < bytes / 4; i++) {
o[i] = c ^ buf[i];