1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-12-23 10:05:46 -05:00

Fix gcc warnings

This commit is contained in:
Jon Beniston 2021-06-09 17:14:56 +01:00
parent 88f2170676
commit 5d24bf9086
6 changed files with 12 additions and 9 deletions

View File

@ -148,7 +148,8 @@ void NoiseFigure::processVISA(QStringList commands)
if (command.endsWith("?"))
{
char buf[1024] = "";
m_visa.viScanf(m_session, "%t", buf);
char format[] = "%t";
m_visa.viScanf(m_session, format, buf);
qDebug() << "VISA <-: " << buf;
}
}

View File

@ -18,7 +18,7 @@
#ifndef INCLUDE_NOISEFIGURECONTROLDIALOG_H
#define INCLUDE_NOISEFIGURECONTROLDIALOG_H
#include "ui_NoiseFigureControlDialog.h"
#include "ui_noisefigurecontroldialog.h"
#include "noisefiguresettings.h"
class NoiseFigureControlDialog : public QDialog {

View File

@ -18,7 +18,7 @@
#ifndef INCLUDE_NOISEFIGUREENRDIALOG_H
#define INCLUDE_NOISEFIGUREENRDIALOG_H
#include "ui_NoiseFigureENRDialog.h"
#include "ui_noisefigureenrdialog.h"
#include "noisefiguresettings.h"
class NoiseFigureENRDialog : public QDialog {

View File

@ -51,6 +51,7 @@ public:
virtual QString displayText(const QVariant &value, const QLocale &locale) const override
{
(void) locale;
return QString::number(value.toDouble(), 'f', m_precision);
}

View File

@ -122,6 +122,7 @@ void NoiseFigureSink::processOneSample(Complex &ci)
void NoiseFigureSink::applyChannelSettings(int channelSampleRate, int channelFrequencyOffset, bool force)
{
(void) force;
qDebug() << "NoiseFigureSink::applyChannelSettings:"
<< " channelSampleRate: " << channelSampleRate
<< " channelFrequencyOffset: " << channelFrequencyOffset;

View File

@ -37,17 +37,17 @@ VISA::VISA() :
#ifdef _MSC_VER
const char *visaName = "visa32.dll"; // Loads visa64.dll on WIN64
#else
const char *visaName = "visakt32.so"; // Keysight library
const char *visaName = "libktvisa32.so"; // Keysight library
#endif
visaLibrary = libraryOpen(visaName);
if (visaLibrary)
{
viOpenDefaultRM = (ViStatus (WINAPI *)(ViPSession)) libraryFunc(visaLibrary, "viOpenDefaultRM");
viOpen = (ViStatus (WINAPI *)(ViSession sesn, ViRsrc name, ViAccessMode mode, ViUInt32 timeout, ViPSession vi)) libraryFunc(visaLibrary, "viOpen");
viClose = (ViStatus (WINAPI *)(ViObject vi)) libraryFunc(visaLibrary, "viClose");
viPrintf = (ViStatus (WINAPI *) (ViSession vi, ViString writeFmt, ...)) libraryFunc(visaLibrary, "viPrintf");
viScanf = (ViStatus (WINAPI *) (ViSession vi, ViString writeFmt, ...)) libraryFunc(visaLibrary, "viScanf");
viOpenDefaultRM = (ViStatus (*)(ViPSession)) libraryFunc(visaLibrary, "viOpenDefaultRM");
viOpen = (ViStatus (*)(ViSession sesn, ViRsrc name, ViAccessMode mode, ViUInt32 timeout, ViPSession vi)) libraryFunc(visaLibrary, "viOpen");
viClose = (ViStatus (*)(ViObject vi)) libraryFunc(visaLibrary, "viClose");
viPrintf = (ViStatus (*) (ViSession vi, ViString writeFmt, ...)) libraryFunc(visaLibrary, "viPrintf");
viScanf = (ViStatus (*) (ViSession vi, ViString writeFmt, ...)) libraryFunc(visaLibrary, "viScanf");
if (viOpenDefaultRM && viOpen && viClose && viPrintf) {
m_available = true;