mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-06-07 08:24:43 -04:00
Quiet more warnings.
This commit is contained in:
@@ -35,23 +35,12 @@ void V4LPlugin::initPlugin(PluginAPI* pluginAPI)
|
||||
PluginInterface::SampleSourceDevices V4LPlugin::enumSampleSources()
|
||||
{
|
||||
SampleSourceDevices result;
|
||||
int count = 1; //rtlsdr_get_device_count();
|
||||
char vendor[256];
|
||||
char product[256];
|
||||
char serial[256];
|
||||
|
||||
for(int i = 0; i < count; i++) {
|
||||
vendor[0] = '\0';
|
||||
product[0] = '\0';
|
||||
serial[0] = '\0';
|
||||
QString displayedName(QString("Kernel Source #1"));
|
||||
SimpleSerializer s(1);
|
||||
s.writeS32(1, 0);
|
||||
result.append(SampleSourceDevice(displayedName, "org.osmocom.sdr.samplesource.v4l", s.final()));
|
||||
|
||||
// if(rtlsdr_get_device_usb_strings((uint32_t)i, vendor, product, serial) != 0)
|
||||
// continue;
|
||||
QString displayedName(QString("SDR #%1").arg(i + 1));
|
||||
SimpleSerializer s(1);
|
||||
s.writeS32(1, i);
|
||||
result.append(SampleSourceDevice(displayedName, "org.osmocom.sdr.samplesource.v4l", s.final()));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -222,17 +222,16 @@ V4LThread::work(int noutput_items)
|
||||
struct timeval tv;
|
||||
struct v4l2_buffer buf;
|
||||
fd_set fds;
|
||||
unsigned int i, items = 0;
|
||||
qint16 xreal, yimag;
|
||||
uint8_t* b;
|
||||
SampleVector::iterator it;
|
||||
|
||||
int pos = 0;
|
||||
unsigned int pos = 0;
|
||||
// in is 4*8bit*2(IQ), 8 bytes; out is 1*16bit*2(IQ) , 4bytes
|
||||
it = m_convertBuffer.begin();
|
||||
if (recebuf_len > 0) {
|
||||
b = (uint8_t *) recebuf_ptr;
|
||||
int len = noutput_items * 8;
|
||||
unsigned int len = noutput_items * 8;
|
||||
if (len > recebuf_len)
|
||||
len = recebuf_len;
|
||||
for (pos = 0; pos < len - 7; pos += 8) {
|
||||
|
||||
Reference in New Issue
Block a user