Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:15.2
limesuite
0001-Remove-some-warnings-LimeRFE-related.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0001-Remove-some-warnings-LimeRFE-related.patch of Package limesuite
From c931854ead81307206bce750c17c2301810b5545 Mon Sep 17 00:00:00 2001 From: Ignas J <i.jarusevicius@limemicro.com> Date: Wed, 29 Jan 2020 10:55:12 +0200 Subject: [PATCH] Remove some warnings (LimeRFE related) --- src/examples/limeRFE_I2C_example.cpp | 1 - src/limeRFE/RFE_Device.cpp | 2 +- src/limeRFE/limeRFE_api.cpp | 7 ++++--- src/limeRFE/limeRFE_cmd.cpp | 3 --- src/limeRFE/limeRFE_wxgui.cpp | 6 +++--- 5 files changed, 8 insertions(+), 11 deletions(-) diff --git a/src/examples/limeRFE_I2C_example.cpp b/src/examples/limeRFE_I2C_example.cpp index 5e6093ec..b7f35fd1 100644 --- a/src/examples/limeRFE_I2C_example.cpp +++ b/src/examples/limeRFE_I2C_example.cpp @@ -25,7 +25,6 @@ int main(int argc, char** argv) { //Find devices int n; - int fd = -1; lms_info_str_t list[8]; //should be large enough to hold all detected devices if ((n = LMS_GetDeviceList(list)) < 0) //NULL can be passed to only get number of devices error(); diff --git a/src/limeRFE/RFE_Device.cpp b/src/limeRFE/RFE_Device.cpp index 6bdaf815..8d2d7df7 100644 --- a/src/limeRFE/RFE_Device.cpp +++ b/src/limeRFE/RFE_Device.cpp @@ -139,7 +139,7 @@ int RFE_Device::SetFrequency(bool dirTx, int ch, float freq) else if (!dirTx && autoRx) boardState.channelIDRX = RxPortCheck(boardState.selPortRX,FreqToBand(freq)); - return Cmd_ConfigureState(sdrDevice, com, boardState); + return Cmd_ConfigureState(sdrDevice, com, boardState); } void RFE_Device::AutoFreq(rfe_boardState& state) diff --git a/src/limeRFE/limeRFE_api.cpp b/src/limeRFE/limeRFE_api.cpp index 3d360af5..524ad145 100644 --- a/src/limeRFE/limeRFE_api.cpp +++ b/src/limeRFE/limeRFE_api.cpp @@ -14,10 +14,10 @@ extern "C" API_EXPORT rfe_dev_t* CALL_CONV RFE_Open(const char* serialport, lms_ if (dev == nullptr && serialport == nullptr) return nullptr; - int result; + int result; - RFE_COM com; - com.fd = -1; + RFE_COM com; + com.fd = -1; #ifndef __unix__ com.hComm = 0; #endif @@ -177,6 +177,7 @@ API_EXPORT int CALL_CONV RFE_AssignSDRChannels(rfe_dev_t* rfe, int rx, int tx) return -1; auto* dev = static_cast<RFE_Device*>(rfe); dev->SetChannels(rx, tx); + return 0; } extern "C" API_EXPORT int RFE_Fan(rfe_dev_t* rfe, int enable) { diff --git a/src/limeRFE/limeRFE_cmd.cpp b/src/limeRFE/limeRFE_cmd.cpp index 805b5383..7deb47d7 100644 --- a/src/limeRFE/limeRFE_cmd.cpp +++ b/src/limeRFE/limeRFE_cmd.cpp @@ -28,7 +28,6 @@ int my_write(RFE_COM com, char* buffer, int count) { int serialport_write(RFE_COM com, const char* str, int len) { - int n; char* cstr = (char*)str; return my_write(com, cstr, len); } @@ -672,7 +671,6 @@ int i2c_write_buffer(lms_device_t* lms, unsigned char* c, int size) { unsigned char addressI2C = RFE_I2C_ADDRESS; unsigned char addressByte = addressI2C << 1; unsigned char addressByteW = addressByte & ~1; - unsigned char addressByteR = addressByte | 1; if(i2c_start(lms) != 0) // send start sequence return -1; @@ -690,7 +688,6 @@ int i2c_write_buffer(lms_device_t* lms, unsigned char* c, int size) { int i2c_read_buffer(lms_device_t* lms, unsigned char* c, int size) { unsigned char addressI2C = RFE_I2C_ADDRESS; unsigned char addressByte = addressI2C << 1; - unsigned char addressByteW = addressByte & ~1; unsigned char addressByteR = addressByte | 1; i2c_start(lms); // send a restart sequence diff --git a/src/limeRFE/limeRFE_wxgui.cpp b/src/limeRFE/limeRFE_wxgui.cpp index 22019a43..3a5d1626 100644 --- a/src/limeRFE/limeRFE_wxgui.cpp +++ b/src/limeRFE/limeRFE_wxgui.cpp @@ -215,7 +215,7 @@ void limeRFE_wxgui::OnbtnOpen(wxCommandEvent& event){ rfe_boardState state; guiState stateGUI; - int status =ReadConfig(dlg.GetPath().To8BitData(), &state, &stateGUI); + ReadConfig(dlg.GetPath().To8BitData(), &state, &stateGUI); powerCellCalCorr = stateGUI.powerCellCorr; powerCalCorr = stateGUI.powerCorr; @@ -521,7 +521,7 @@ void limeRFE_wxgui::SetChannelsTypesTXRX(int channelTXRX) { if (i == RFE_TYPE_INDEX_CELL) cTypeTXRX->AppendString("Cellular"); } - if (cTypeTXRX->GetCount() < (*lastTypeSelectionTXRX + 1)) + if (cTypeTXRX->GetCount() < unsigned(*lastTypeSelectionTXRX + 1)) *lastTypeSelectionTXRX = 0; cTypeTXRX->SetSelection(*lastTypeSelectionTXRX); @@ -623,7 +623,7 @@ void limeRFE_wxgui::SetConfigurationOptions() { cPortTX->AppendString(RFE_PORT_1_NAME); portTXvals[0] = RFE_PORT_1; } - else if ((selChannelIDTX == RFE_CID_HAM_0030) || + else if ((selChannelIDTX == RFE_CID_HAM_0030) || (selChannelIDTX == RFE_CID_HAM_0070)) { cPortTX->AppendString(RFE_PORT_3_NAME); portTXvals[0] = RFE_PORT_3; -- 2.25.0
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor