mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-06-08 08:54:49 -04:00
activated compiler warnings
This commit is contained in:
@@ -29,24 +29,24 @@ const int SDRdaemonFECBuffer::m_sampleSize = 2;
|
||||
const int SDRdaemonFECBuffer::m_iqSampleSize = 2 * m_sampleSize;
|
||||
|
||||
SDRdaemonFECBuffer::SDRdaemonFECBuffer(uint32_t throttlems) :
|
||||
m_frameHead(0),
|
||||
m_decoderIndexHead(nbDecoderSlots/2),
|
||||
m_frameHead(0),
|
||||
m_curNbBlocks(0),
|
||||
m_minNbBlocks(256),
|
||||
m_curOriginalBlocks(0),
|
||||
m_minOriginalBlocks(128),
|
||||
m_curNbRecovery(0),
|
||||
m_maxNbRecovery(0),
|
||||
m_framesDecoded(true),
|
||||
m_throttlemsNominal(throttlems),
|
||||
m_readIndex(0),
|
||||
m_throttlemsNominal(throttlems),
|
||||
m_readBuffer(0),
|
||||
m_readSize(0),
|
||||
m_bufferLenSec(0.0f),
|
||||
m_nbReads(0),
|
||||
m_nbWrites(0),
|
||||
m_balCorrection(0),
|
||||
m_balCorrLimit(0),
|
||||
m_curOriginalBlocks(0)
|
||||
m_nbReads(0),
|
||||
m_nbWrites(0),
|
||||
m_balCorrection(0),
|
||||
m_balCorrLimit(0)
|
||||
{
|
||||
m_currentMeta.init();
|
||||
m_framesNbBytes = nbDecoderSlots * sizeof(BufferFrame);
|
||||
@@ -141,7 +141,7 @@ void SDRdaemonFECBuffer::rwCorrectionEstimate(int slotIndex)
|
||||
int dBytes;
|
||||
int rwDelta = (m_nbReads * m_readNbBytes) - (m_nbWrites * sizeof(BufferFrame));
|
||||
|
||||
if (normalizedReadIndex < (nbDecoderSlots/ 2) * sizeof(BufferFrame)) // read leads
|
||||
if (normalizedReadIndex < (nbDecoderSlots/ 2) * (int) sizeof(BufferFrame)) // read leads
|
||||
{
|
||||
dBytes = - normalizedReadIndex - rwDelta;
|
||||
}
|
||||
@@ -158,8 +158,6 @@ void SDRdaemonFECBuffer::rwCorrectionEstimate(int slotIndex)
|
||||
m_balCorrection = m_balCorrLimit;
|
||||
}
|
||||
|
||||
float rwRatio = (float) (m_nbWrites * sizeof(BufferFrame)) / (float) (m_nbReads * m_readNbBytes);
|
||||
|
||||
m_nbReads = 0;
|
||||
m_nbWrites = 0;
|
||||
}
|
||||
@@ -190,7 +188,7 @@ void SDRdaemonFECBuffer::checkSlotData(int slotIndex)
|
||||
}
|
||||
}
|
||||
|
||||
void SDRdaemonFECBuffer::writeData(char *array, uint32_t length)
|
||||
void SDRdaemonFECBuffer::writeData(char *array)
|
||||
{
|
||||
SuperBlock *superBlock = (SuperBlock *) array;
|
||||
int frameIndex = superBlock->header.frameIndex;
|
||||
@@ -323,7 +321,7 @@ void SDRdaemonFECBuffer::writeData(char *array, uint32_t length)
|
||||
} // decode
|
||||
}
|
||||
|
||||
void SDRdaemonFECBuffer::writeData0(char *array, uint32_t length)
|
||||
void SDRdaemonFECBuffer::writeData0(char *array __attribute__((unused)), uint32_t length __attribute__((unused)))
|
||||
{
|
||||
// Kept as comments for the out of sync blocks algorithms
|
||||
// assert(length == m_udpPayloadSize);
|
||||
|
||||
@@ -87,7 +87,7 @@ public:
|
||||
~SDRdaemonFECBuffer();
|
||||
|
||||
// R/W operations
|
||||
void writeData(char *array, uint32_t length); //!< Write data into buffer.
|
||||
void writeData(char *array); //!< Write data into buffer.
|
||||
void writeData0(char *array, uint32_t length); //!< Write data into buffer.
|
||||
uint8_t *readData(int32_t length); //!< Read data from buffer
|
||||
|
||||
@@ -148,7 +148,6 @@ public:
|
||||
{
|
||||
int32_t val = (m_wrDeltaEstimate * 100) / (int32_t) m_framesNbBytes;
|
||||
int32_t ret = val < 0 ? -val - 50 : 50 -val;
|
||||
int32_t rp = (m_readIndex * 100) / (int32_t) m_framesNbBytes;
|
||||
return ret;
|
||||
}
|
||||
else
|
||||
@@ -210,7 +209,7 @@ private:
|
||||
|
||||
uint32_t m_throttlemsNominal; //!< Initial throttle in ms
|
||||
uint8_t* m_readBuffer; //!< Read buffer to hold samples when looping back to beginning of raw buffer
|
||||
uint32_t m_readSize; //!< Read buffer size
|
||||
int m_readSize; //!< Read buffer size
|
||||
|
||||
float m_bufferLenSec;
|
||||
|
||||
|
||||
@@ -54,23 +54,23 @@ SDRdaemonFECGui::SDRdaemonFECGui(DeviceSourceAPI *deviceAPI, QWidget* parent) :
|
||||
m_framesDecodingStatus(0),
|
||||
m_bufferLengthInSecs(0.0),
|
||||
m_bufferGauge(-50),
|
||||
m_samplesCount(0),
|
||||
m_tickCount(0),
|
||||
m_address("127.0.0.1"),
|
||||
m_dataPort(9090),
|
||||
m_controlPort(9091),
|
||||
m_addressEdited(false),
|
||||
m_dataPortEdited(false),
|
||||
m_initSendConfiguration(false),
|
||||
m_dcBlock(false),
|
||||
m_iqCorrection(false),
|
||||
m_nbOriginalBlocks(128),
|
||||
m_nbFECBlocks(0)
|
||||
m_nbFECBlocks(0),
|
||||
m_samplesCount(0),
|
||||
m_tickCount(0),
|
||||
m_address("127.0.0.1"),
|
||||
m_dataPort(9090),
|
||||
m_controlPort(9091),
|
||||
m_addressEdited(false),
|
||||
m_dataPortEdited(false),
|
||||
m_initSendConfiguration(false),
|
||||
m_dcBlock(false),
|
||||
m_iqCorrection(false)
|
||||
{
|
||||
m_sender = nn_socket(AF_SP, NN_PAIR);
|
||||
assert(m_sender != -1);
|
||||
int millis = 500;
|
||||
int rc = nn_setsockopt (m_sender, NN_SOL_SOCKET, NN_SNDTIMEO, &millis, sizeof (millis));
|
||||
nn_setsockopt (m_sender, NN_SOL_SOCKET, NN_SNDTIMEO, &millis, sizeof (millis));
|
||||
assert (rc == 0);
|
||||
|
||||
m_paletteGreenText.setColor(QPalette::WindowText, Qt::green);
|
||||
@@ -185,7 +185,6 @@ bool SDRdaemonFECGui::deserialize(const QByteArray& data)
|
||||
{
|
||||
SimpleDeserializer d(data);
|
||||
QString address;
|
||||
uint32_t uintval;
|
||||
quint16 dataPort;
|
||||
bool dcBlock;
|
||||
bool iqCorrection;
|
||||
@@ -381,7 +380,7 @@ void SDRdaemonFECGui::displayConfigurationParameters(uint32_t freq,
|
||||
ui->specificParms->setCursorPosition(0);
|
||||
}
|
||||
|
||||
void SDRdaemonFECGui::on_applyButton_clicked(bool checked)
|
||||
void SDRdaemonFECGui::on_applyButton_clicked(bool checked __attribute__((unused)))
|
||||
{
|
||||
bool dataOk, ctlOk;
|
||||
QString udpAddress = ui->address->text();
|
||||
@@ -412,7 +411,7 @@ void SDRdaemonFECGui::on_applyButton_clicked(bool checked)
|
||||
ui->applyButton->setEnabled(false);
|
||||
}
|
||||
|
||||
void SDRdaemonFECGui::on_sendButton_clicked(bool checked)
|
||||
void SDRdaemonFECGui::on_sendButton_clicked(bool checked __attribute__((unused)))
|
||||
{
|
||||
sendConfiguration();
|
||||
ui->specificParms->setCursorPosition(0);
|
||||
@@ -481,19 +480,19 @@ void SDRdaemonFECGui::sendConfiguration()
|
||||
}
|
||||
}
|
||||
|
||||
void SDRdaemonFECGui::on_address_textEdited(const QString& arg1)
|
||||
void SDRdaemonFECGui::on_address_textEdited(const QString& arg1 __attribute__((unused)))
|
||||
{
|
||||
ui->applyButton->setEnabled(true);
|
||||
m_addressEdited = true;
|
||||
}
|
||||
|
||||
void SDRdaemonFECGui::on_dataPort_textEdited(const QString& arg1)
|
||||
void SDRdaemonFECGui::on_dataPort_textEdited(const QString& arg1 __attribute__((unused)))
|
||||
{
|
||||
ui->applyButton->setEnabled(true);
|
||||
m_dataPortEdited = true;
|
||||
}
|
||||
|
||||
void SDRdaemonFECGui::on_controlPort_textEdited(const QString& arg1)
|
||||
void SDRdaemonFECGui::on_controlPort_textEdited(const QString& arg1 __attribute__((unused)))
|
||||
{
|
||||
ui->applyButton->setEnabled(true);
|
||||
}
|
||||
@@ -516,27 +515,27 @@ void SDRdaemonFECGui::on_iqImbalance_toggled(bool checked)
|
||||
}
|
||||
}
|
||||
|
||||
void SDRdaemonFECGui::on_freq_textEdited(const QString& arg1)
|
||||
void SDRdaemonFECGui::on_freq_textEdited(const QString& arg1 __attribute__((unused)))
|
||||
{
|
||||
ui->sendButton->setEnabled(true);
|
||||
}
|
||||
|
||||
void SDRdaemonFECGui::on_sampleRate_textEdited(const QString& arg1)
|
||||
void SDRdaemonFECGui::on_sampleRate_textEdited(const QString& arg1 __attribute__((unused)))
|
||||
{
|
||||
ui->sendButton->setEnabled(true);
|
||||
}
|
||||
|
||||
void SDRdaemonFECGui::on_specificParms_textEdited(const QString& arg1)
|
||||
void SDRdaemonFECGui::on_specificParms_textEdited(const QString& arg1 __attribute__((unused)))
|
||||
{
|
||||
ui->sendButton->setEnabled(true);
|
||||
}
|
||||
|
||||
void SDRdaemonFECGui::on_decim_currentIndexChanged(int index)
|
||||
void SDRdaemonFECGui::on_decim_currentIndexChanged(int index __attribute__((unused)))
|
||||
{
|
||||
ui->sendButton->setEnabled(true);
|
||||
}
|
||||
|
||||
void SDRdaemonFECGui::on_fcPos_currentIndexChanged(int index)
|
||||
void SDRdaemonFECGui::on_fcPos_currentIndexChanged(int index __attribute__((unused)))
|
||||
{
|
||||
ui->sendButton->setEnabled(true);
|
||||
}
|
||||
|
||||
@@ -148,7 +148,7 @@ void SDRdaemonFECUDPHandler::dataReadyRead()
|
||||
|
||||
void SDRdaemonFECUDPHandler::processData()
|
||||
{
|
||||
m_sdrDaemonBuffer.writeData(m_udpBuf, m_udpReadBytes);
|
||||
m_sdrDaemonBuffer.writeData(m_udpBuf);
|
||||
const SDRdaemonFECBuffer::MetaDataFEC& metaData = m_sdrDaemonBuffer.getCurrentMeta();
|
||||
|
||||
bool change = false;
|
||||
|
||||
@@ -72,7 +72,7 @@ private:
|
||||
uint32_t m_readLengthSamples;
|
||||
uint32_t m_readLength;
|
||||
bool m_throttleToggle;
|
||||
int m_rateDivider;
|
||||
uint32_t m_rateDivider;
|
||||
bool m_autoCorrBuffer;
|
||||
|
||||
void processData();
|
||||
|
||||
Reference in New Issue
Block a user