Skip to content

Commit

Permalink
remove extra semicolons to make old compilers happy
Browse files Browse the repository at this point in the history
Extra (redundant) semicolons are valid in modern C++ (starting from
C++11). New versions of the compilers warn of this issue only if the
`Wextra-semi` option is explicitly enabled. But old compilers perform
this checking implicitly in the scope of the `Wpedantic` option.

So, the warning is not reported on modern hosts (e.g., Ubuntu 24.04 with
GCC v13.2 and Clang v18.1) but is reported on old hosts (e.g., Debian 11
with GCC v10.2 and Clang v11.0).

Although the extra semicolons may be useful in some cases, in this
particular case, they seem really redundant, so it is proposed to remove
them.

Test: build the project with GCC v10.2.
Signed-off-by: Gluttton <gluttton@ukr.net>
  • Loading branch information
Gluttton committed Oct 19, 2024
1 parent 82cdcd7 commit f4d25ab
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 8 deletions.
4 changes: 3 additions & 1 deletion src/FPGA/WriteRegistersBatch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ using namespace std::literals::string_literals;
/// @brief Constructor for the batch.
/// @param fpga The FPGA this batch belongs to.
WriteRegistersBatch::WriteRegistersBatch(FPGA* fpga)
: owner(fpga){};
: owner(fpga)
{
}

WriteRegistersBatch::~WriteRegistersBatch()
{
Expand Down
4 changes: 3 additions & 1 deletion src/boards/LimeSDR_Mini/USB_CSR_Pipe_Mini.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ static const int CONTROL_BULK_READ_ADDRESS = 0x82;

USB_CSR_Pipe_Mini::USB_CSR_Pipe_Mini(FT601& port)
: USB_CSR_Pipe()
, port(port){};
, port(port)
{
}

int USB_CSR_Pipe_Mini::Write(const uint8_t* data, size_t length, int timeout_ms)
{
Expand Down
12 changes: 8 additions & 4 deletions src/include/limesuiteng/SDRDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ StreamConfig::StreamConfig()
channels[TRXDir::Tx] = {};
}

SDRDevice::~SDRDevice(){};
SDRDevice::~SDRDevice()
{
}

OpStatus SDRDevice::UploadTxWaveform(const StreamConfig& config, uint8_t moduleIndex, const void** samples, uint32_t count)
{
Expand Down Expand Up @@ -85,7 +87,9 @@ OpStatus SDRDevice::CustomParameterRead(std::vector<CustomParameterIO>& paramete
return ReportError(OpStatus::NotImplemented, "CustomParameterRead not implemented"s);
}

void SDRDevice::SetMessageLogCallback(LogCallbackType callback){};
void SDRDevice::SetMessageLogCallback(LogCallbackType callback)
{
}

OpStatus SDRDevice::UploadMemory(
eMemoryDevice device, uint8_t moduleIndex, const char* data, size_t length, UploadMemoryCallback callback)
Expand All @@ -107,13 +111,13 @@ void SDRDevice::StreamStart(const std::vector<uint8_t>& moduleIndexes)
{
for (uint8_t i : moduleIndexes)
StreamStart(i);
};
}

void SDRDevice::StreamStop(const std::vector<uint8_t>& moduleIndexes)
{
for (uint8_t i : moduleIndexes)
StreamStop(i);
};
}

OpStatus SDRDevice::OEMTest(OEMTestReporter* reporter)
{
Expand Down
4 changes: 3 additions & 1 deletion src/streaming/AvgRmsCounter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ AvgRmsCounter::AvgRmsCounter()
, avgAccumulator(0)
, rmsAccumulator(0)
, min(1e16)
, max(1e-16){};
, max(1e-16)
{
}

void AvgRmsCounter::Add(double value)
{
Expand Down
2 changes: 1 addition & 1 deletion src/utilities/DeltaVariable.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ template<class T> class DeltaVariable
T mLastValue;
};

}; // namespace lime
} // namespace lime

0 comments on commit f4d25ab

Please sign in to comment.