Fix some compile warnings and deprecation.

merge-requests/2/head
Phil Taylor 2021-03-13 16:56:48 +00:00
rodzic d9b1fb2a5f
commit 7f4be42331
7 zmienionych plików z 19 dodań i 18 usunięć

Wyświetl plik

@ -103,7 +103,6 @@ int main(int argc, char *argv[])
return a.exec();
qInfo(logSystem()) << "wfview is finished";
}

Wyświetl plik

@ -928,7 +928,7 @@ EXPORT int speex_resampler_process_int(SpeexResamplerState *st, spx_uint32_t cha
EXPORT int speex_resampler_process_float(SpeexResamplerState *st, spx_uint32_t channel_index, const float *in, spx_uint32_t *in_len, float *out, spx_uint32_t *out_len)
#endif
{
int j;
unsigned int j;
spx_uint32_t ilen = *in_len;
spx_uint32_t olen = *out_len;
spx_word16_t *x = st->mem + channel_index * st->mem_alloc_size;
@ -969,7 +969,7 @@ EXPORT int speex_resampler_process_float(SpeexResamplerState *st, spx_uint32_t c
EXPORT int speex_resampler_process_int(SpeexResamplerState *st, spx_uint32_t channel_index, const spx_int16_t *in, spx_uint32_t *in_len, spx_int16_t *out, spx_uint32_t *out_len)
#endif
{
int j;
unsigned int j;
const int istride_save = st->in_stride;
const int ostride_save = st->out_stride;
spx_uint32_t ilen = *in_len;

Wyświetl plik

@ -39,7 +39,7 @@
#define OVERRIDE_INNER_PRODUCT_SINGLE
static inline float inner_product_single(const float *a, const float *b, unsigned int len)
{
int i;
unsigned int i;
float ret;
__m128 sum = _mm_setzero_ps();
for (i=0;i<len;i+=8)
@ -55,7 +55,7 @@ static inline float inner_product_single(const float *a, const float *b, unsigne
#define OVERRIDE_INTERPOLATE_PRODUCT_SINGLE
static inline float interpolate_product_single(const float *a, const float *b, unsigned int len, const spx_uint32_t oversample, float *frac) {
int i;
unsigned int i;
float ret;
__m128 sum = _mm_setzero_ps();
__m128 f = _mm_loadu_ps(frac);
@ -77,7 +77,7 @@ static inline float interpolate_product_single(const float *a, const float *b, u
static inline double inner_product_double(const float *a, const float *b, unsigned int len)
{
int i;
unsigned int i;
double ret;
__m128d sum = _mm_setzero_pd();
__m128 t;
@ -98,7 +98,7 @@ static inline double inner_product_double(const float *a, const float *b, unsign
#define OVERRIDE_INTERPOLATE_PRODUCT_DOUBLE
static inline double interpolate_product_double(const float *a, const float *b, unsigned int len, const spx_uint32_t oversample, float *frac) {
int i;
unsigned int i;
double ret;
__m128d sum;
__m128d sum1 = _mm_setzero_pd();

Wyświetl plik

@ -2204,7 +2204,7 @@ void rigCommander::determineRigCaps()
payloadPrefix.append(civAddr);
payloadPrefix.append((char)compCivAddr);
// if there is a compile-time error, remove the following line, the "hex" part is the issue:
qDebug(logRig()) << "Using incomingCIVAddr: (int): " << this->civAddr << " hex: " << hex << this->civAddr;
qDebug(logRig()) << "Using incomingCIVAddr: (int): " << this->civAddr << " Qt::hex: " << Qt::hex << this->civAddr;
emit discoveredRigID(rigCaps);
} else {
emit haveRigID(rigCaps);

Wyświetl plik

@ -1040,7 +1040,7 @@ void udpBase::dataReceived(QByteArray r)
return s.seqNum == cs;
});
if (match == txSeqBuf.end()) {
qDebug(logUdp()) << this->metaObject()->className() << ": Requested packet " << hex << seq << " not found";
qDebug(logUdp()) << this->metaObject()->className() << ": Requested packet " << Qt::hex << seq << " not found";
// Just send idle packet.
sendControl(false, 0, match->seqNum);
}
@ -1067,7 +1067,7 @@ void udpBase::dataReceived(QByteArray r)
std::sort(rxSeqBuf.begin(), rxSeqBuf.end());
if (in->seq < rxSeqBuf.front())
{
qDebug(logUdp()) << this->metaObject()->className() << ": ******* seq number may have rolled over ****** previous highest: " << hex << rxSeqBuf.back() << " current: " << hex << in->seq;
qDebug(logUdp()) << this->metaObject()->className() << ": ******* seq number may have rolled over ****** previous highest: " << Qt::hex << rxSeqBuf.back() << " current: " << Qt::hex << in->seq;
// Looks like it has rolled over so clear buffer and start again.
rxSeqBuf.clear();
@ -1082,7 +1082,7 @@ void udpBase::dataReceived(QByteArray r)
auto s = std::find_if(rxMissing.begin(), rxMissing.end(), [&cs = in->seq](SEQBUFENTRY& s) { return s.seqNum == cs; });
if (s != rxMissing.end())
{
qDebug(logUdp()) << this->metaObject()->className() << ": Missing SEQ has been received! " << hex << in->seq;
qDebug(logUdp()) << this->metaObject()->className() << ": Missing SEQ has been received! " << Qt::hex << in->seq;
s = rxMissing.erase(s);
}
}
@ -1168,7 +1168,7 @@ void udpBase::sendRetransmitRequest()
if (missingSeqs.length() == 4) // This is just a single missing packet so send using a control.
{
p.seq = (missingSeqs[0] & 0xff) | (quint16)(missingSeqs[1] << 8);
qDebug(logUdp()) << this->metaObject()->className() << ": sending request for missing packet : " << hex << p.seq;
qDebug(logUdp()) << this->metaObject()->className() << ": sending request for missing packet : " << Qt::hex << p.seq;
QMutexLocker udplocker(&udpMutex);
udp->writeDatagram(QByteArray::fromRawData((const char*)p.packet, sizeof(p)), radioIP, port);
}

Wyświetl plik

@ -584,7 +584,7 @@ void udpServer::commonReceived(QList<CLIENT*>* l,CLIENT* current, QByteArray r)
// Found matching entry?
// Don't constantly retransmit the same packet, give-up eventually
QMutexLocker locker(&mutex);
qDebug(logUdpServer()) << this->metaObject()->className() << ": Sending retransmit of " << hex << match->seqNum;
qDebug(logUdpServer()) << this->metaObject()->className() << ": Sending retransmit of " << Qt::hex << match->seqNum;
match->retransmitCount++;
current->socket->writeDatagram(match->data, current->ipAddress, current->port);
} else {
@ -611,7 +611,7 @@ void udpServer::commonReceived(QList<CLIENT*>* l,CLIENT* current, QByteArray r)
return s.seqNum == cs;
});
if (match == current->txSeqBuf.end()) {
qDebug(logUdpServer()) << current->ipAddress.toString() << ":" << current->port << ": Requested packet " << hex << in->seq << " not found";
qDebug(logUdpServer()) << current->ipAddress.toString() << ":" << current->port << ": Requested packet " << Qt::hex << in->seq << " not found";
// Just send idle packet.
sendControl(current, 0, in->seq);
}
@ -620,7 +620,7 @@ void udpServer::commonReceived(QList<CLIENT*>* l,CLIENT* current, QByteArray r)
// Found matching entry?
// Send "untracked" as it has already been sent once.
QMutexLocker locker(&mutex);
qDebug(logUdpServer()) << current->ipAddress.toString() << ":" << current->port << ": Sending retransmit of " << hex << match->seqNum;
qDebug(logUdpServer()) << current->ipAddress.toString() << ":" << current->port << ": Sending retransmit of " << Qt::hex << match->seqNum;
match->retransmitCount++;
current->socket->writeDatagram(match->data, current->ipAddress, current->port);
match++;
@ -639,7 +639,7 @@ void udpServer::commonReceived(QList<CLIENT*>* l,CLIENT* current, QByteArray r)
std::sort(current->rxSeqBuf.begin(), current->rxSeqBuf.end());
if (in->seq < current->rxSeqBuf.front())
{
qDebug(logUdpServer()) << current->ipAddress.toString() << ": ******* seq number may have rolled over ****** previous highest: " << hex << current->rxSeqBuf.back() << " current: " << hex << in->seq;
qDebug(logUdpServer()) << current->ipAddress.toString() << ": ******* seq number may have rolled over ****** previous highest: " << Qt::hex << current->rxSeqBuf.back() << " current: " << Qt::hex << in->seq;
// Looks like it has rolled over so clear buffer and start again.
current->rxSeqBuf.clear();
return;
@ -653,7 +653,7 @@ void udpServer::commonReceived(QList<CLIENT*>* l,CLIENT* current, QByteArray r)
auto s = std::find_if(current->rxMissing.begin(), current->rxMissing.end(), [&cs = in->seq](SEQBUFENTRY& s) { return s.seqNum == cs; });
if (s != current->rxMissing.end())
{
qDebug(logUdpServer()) << current->ipAddress.toString() << ": Missing SEQ has been received! " << hex << in->seq;
qDebug(logUdpServer()) << current->ipAddress.toString() << ": Missing SEQ has been received! " << Qt::hex << in->seq;
s = current->rxMissing.erase(s);
}
}
@ -1163,7 +1163,7 @@ void udpServer::sendRetransmitRequest(CLIENT *c)
if (missingSeqs.length() == 4) // This is just a single missing packet so send using a control.
{
p.seq = (missingSeqs[0] & 0xff) | (quint16)(missingSeqs[1] << 8);
qDebug(logUdpServer()) << c->ipAddress.toString() << ": sending request for missing packet : " << hex << p.seq;
qDebug(logUdpServer()) << c->ipAddress.toString() << ": sending request for missing packet : " << Qt::hex << p.seq;
c->socket->writeDatagram(QByteArray::fromRawData((const char*)p.packet, sizeof(p)), c->ipAddress, c->port);
}
else

Wyświetl plik

@ -38,6 +38,8 @@ DEFINES += RANDOM_PREFIX=wf
macos:INCLUDEPATH += /usr/local/include
macos:LIBS += -L/usr/local/lib
macx:ICON = resources/wfview.icns
!win32:DEFINES += HOST=\\\"`hostname`\\\" UNAME=\\\"`whoami`\\\"
!win32:DEFINES += GITSHORT="\\\"$(shell git -C $$PWD rev-parse --short HEAD)\\\""