mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-25 09:18:54 -05:00
Fixed -Wclass-memaccess warnings
This commit is contained in:
parent
142b8c997a
commit
3f2f1fcd7f
@ -548,7 +548,13 @@ struct s2_frame_receiver : runnable
|
||||
{
|
||||
diffcorr = 0;
|
||||
coarse_count = 0;
|
||||
memset(hist, 0, sizeof(hist));
|
||||
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
hist[i].p = 0;
|
||||
hist[i].c = 0;
|
||||
}
|
||||
|
||||
state = COARSE_FREQ;
|
||||
}
|
||||
|
||||
@ -907,7 +913,12 @@ struct s2_frame_receiver : runnable
|
||||
|
||||
// Read SOF
|
||||
|
||||
memset(hist, 0, sizeof(hist));
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
hist[i].p = 0;
|
||||
hist[i].c = 0;
|
||||
}
|
||||
|
||||
complex<float> sof_corr = 0;
|
||||
uint32_t sofbits = 0;
|
||||
for (int s = 0; s < sof.LENGTH; ++s)
|
||||
|
@ -1080,7 +1080,12 @@ struct cstln_receiver : runnable
|
||||
ss_out = _ss_out ? new pipewriter<float>(*_ss_out) : NULL;
|
||||
mer_out = _mer_out ? new pipewriter<float>(*_mer_out) : NULL;
|
||||
cstln_out = _cstln_out ? new pipewriter<cf32>(*_cstln_out) : NULL;
|
||||
memset(hist, 0, sizeof(hist));
|
||||
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
hist[i].p = 0;
|
||||
hist[i].c = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void set_omega(float _omega, float tol = 10e-6)
|
||||
|
@ -136,11 +136,11 @@ ATVModSource::ATVModSource() :
|
||||
|
||||
m_SSBFilter = new fftfilt(0, m_settings.m_rfBandwidth / (float) m_channelSampleRate, m_ssbFftLen); // arbitrary cutoff
|
||||
m_SSBFilterBuffer = new Complex[m_ssbFftLen/2]; // filter returns data exactly half of its size
|
||||
memset(m_SSBFilterBuffer, 0, sizeof(Complex)*(m_ssbFftLen>>1));
|
||||
std::fill(m_SSBFilterBuffer, m_SSBFilterBuffer + (m_ssbFftLen>>1), Complex{0, 0});
|
||||
|
||||
m_DSBFilter = new fftfilt((2.0f * m_settings.m_rfBandwidth) / (float) m_channelSampleRate, 2*m_ssbFftLen); // arbitrary cutoff
|
||||
m_DSBFilterBuffer = new Complex[m_ssbFftLen];
|
||||
memset(m_DSBFilterBuffer, 0, sizeof(Complex)*(m_ssbFftLen));
|
||||
std::fill(m_DSBFilterBuffer, m_DSBFilterBuffer + m_ssbFftLen, Complex{0, 0});
|
||||
|
||||
m_interpolatorDistanceRemain = 0.0f;
|
||||
m_interpolatorDistance = 1.0f;
|
||||
|
@ -187,7 +187,8 @@ void UDPSourceUDPHandler::readSample(Sample &s)
|
||||
}
|
||||
else
|
||||
{
|
||||
memcpy(&s, &m_udpBuf[m_readFrameIndex][m_readIndex], sizeof(Sample));
|
||||
Sample *u = (Sample *) &m_udpBuf[m_readFrameIndex][m_readIndex];
|
||||
s = *u;
|
||||
advanceReadPointer((int) sizeof(Sample));
|
||||
}
|
||||
}
|
||||
|
@ -59,11 +59,11 @@ void fftfilt::init_filter()
|
||||
output = new cmplx[flen2];
|
||||
ovlbuf = new cmplx[flen2];
|
||||
|
||||
memset(filter, 0, flen * sizeof(cmplx));
|
||||
memset(filterOpp, 0, flen * sizeof(cmplx));
|
||||
memset(data, 0, flen * sizeof(cmplx));
|
||||
memset(output, 0, flen2 * sizeof(cmplx));
|
||||
memset(ovlbuf, 0, flen2 * sizeof(cmplx));
|
||||
std::fill(filter, filter + flen, cmplx{0, 0});
|
||||
std::fill(filterOpp, filterOpp + flen, cmplx{0, 0});
|
||||
std::fill(data, data + flen , cmplx{0, 0});
|
||||
std::fill(output, output + flen2, cmplx{0, 0});
|
||||
std::fill(ovlbuf, ovlbuf + flen2, cmplx{0, 0});
|
||||
|
||||
inptr = 0;
|
||||
}
|
||||
@ -115,7 +115,7 @@ fftfilt::~fftfilt()
|
||||
void fftfilt::create_filter(float f1, float f2)
|
||||
{
|
||||
// initialize the filter to zero
|
||||
memset(filter, 0, flen * sizeof(cmplx));
|
||||
std::fill(filter, filter + flen, cmplx{0, 0});
|
||||
|
||||
// create the filter shape coefficients by fft
|
||||
bool b_lowpass, b_highpass;
|
||||
@ -156,7 +156,7 @@ void fftfilt::create_filter(float f1, float f2)
|
||||
void fftfilt::create_dsb_filter(float f2)
|
||||
{
|
||||
// initialize the filter to zero
|
||||
memset(filter, 0, flen * sizeof(cmplx));
|
||||
std::fill(filter, filter + flen, cmplx{0, 0});
|
||||
|
||||
for (int i = 0; i < flen2; i++) {
|
||||
filter[i] = fsinc(f2, i, flen2);
|
||||
@ -183,7 +183,7 @@ void fftfilt::create_asym_filter(float fopp, float fin)
|
||||
{
|
||||
// in band
|
||||
// initialize the filter to zero
|
||||
memset(filter, 0, flen * sizeof(cmplx));
|
||||
std::fill(filter, filter + flen, cmplx{0, 0});
|
||||
|
||||
for (int i = 0; i < flen2; i++) {
|
||||
filter[i] = fsinc(fin, i, flen2);
|
||||
@ -205,7 +205,7 @@ void fftfilt::create_asym_filter(float fopp, float fin)
|
||||
|
||||
// opposite band
|
||||
// initialize the filter to zero
|
||||
memset(filterOpp, 0, flen * sizeof(cmplx));
|
||||
std::fill(filterOpp, filterOpp + flen, cmplx{0, 0});
|
||||
|
||||
for (int i = 0; i < flen2; i++) {
|
||||
filterOpp[i] = fsinc(fopp, i, flen2);
|
||||
@ -282,7 +282,7 @@ int fftfilt::runFilt(const cmplx & in, cmplx **out)
|
||||
output[i] = ovlbuf[i] + data[i];
|
||||
ovlbuf[i] = data[flen2 + i];
|
||||
}
|
||||
memset (data, 0, flen * sizeof(cmplx));
|
||||
std::fill(data, data + flen , cmplx{0, 0});
|
||||
|
||||
*out = output;
|
||||
return flen2;
|
||||
@ -325,7 +325,7 @@ int fftfilt::runSSB(const cmplx & in, cmplx **out, bool usb, bool getDC)
|
||||
output[i] = ovlbuf[i] + data[i];
|
||||
ovlbuf[i] = data[i+flen2];
|
||||
}
|
||||
memset (data, 0, flen * sizeof(cmplx));
|
||||
std::fill(data, data + flen , cmplx{0, 0});
|
||||
|
||||
*out = output;
|
||||
return flen2;
|
||||
@ -358,7 +358,7 @@ int fftfilt::runDSB(const cmplx & in, cmplx **out, bool getDC)
|
||||
ovlbuf[i] = data[i+flen2];
|
||||
}
|
||||
|
||||
memset (data, 0, flen * sizeof(cmplx));
|
||||
std::fill(data, data + flen , cmplx{0, 0});
|
||||
|
||||
*out = output;
|
||||
return flen2;
|
||||
@ -402,7 +402,7 @@ int fftfilt::runAsym(const cmplx & in, cmplx **out, bool usb)
|
||||
ovlbuf[i] = data[i+flen2];
|
||||
}
|
||||
|
||||
memset (data, 0, flen * sizeof(cmplx));
|
||||
std::fill(data, data + flen , cmplx{0, 0});
|
||||
|
||||
*out = output;
|
||||
return flen2;
|
||||
|
Loading…
Reference in New Issue
Block a user