fix some compilation warning in RF lib

master
Andre Puschmann 5 years ago
parent 47019e26f6
commit 4f83c27e93

@ -22,7 +22,7 @@
/* RF frontend API */ /* RF frontend API */
typedef struct { typedef struct {
const char *name; const char *name;
char* (*srslte_rf_devname) (void *h); const char* (*srslte_rf_devname)(void* h);
int (*srslte_rf_start_rx_stream)(void *h, bool now); int (*srslte_rf_start_rx_stream)(void *h, bool now);
int (*srslte_rf_stop_rx_stream)(void *h); int (*srslte_rf_stop_rx_stream)(void *h);
void (*srslte_rf_flush_buffer)(void *h); void (*srslte_rf_flush_buffer)(void *h);

@ -186,8 +186,7 @@ void rf_soapy_register_error_handler(void *h, srslte_rf_error_handler_t new_hand
handler->soapy_error_handler = new_handler; handler->soapy_error_handler = new_handler;
} }
const char* rf_soapy_devname(void* h)
char* rf_soapy_devname(void* h)
{ {
rf_soapy_handler_t *handler = (rf_soapy_handler_t*) h; rf_soapy_handler_t *handler = (rf_soapy_handler_t*) h;
return handler->devname; return handler->devname;
@ -209,9 +208,7 @@ void rf_soapy_calibrate_tx(void *h)
char str_buf[25]; char str_buf[25];
snprintf(str_buf, sizeof(str_buf), "%f", actual_bw); snprintf(str_buf, sizeof(str_buf), "%f", actual_bw);
str_buf[24] = 0; str_buf[24] = 0;
if (SoapySDRDevice_writeSetting(handler->device, "CALIBRATE_TX", str_buf)) { SoapySDRDevice_writeSetting(handler->device, "CALIBRATE_TX", str_buf);
printf("Error calibrating Rx\n");
}
} }
int rf_soapy_start_rx_stream(void *h, bool now) int rf_soapy_start_rx_stream(void *h, bool now)

@ -32,7 +32,7 @@ SRSLTE_API int rf_soapy_open(char *args,
SRSLTE_API int rf_soapy_open_multi(char* args, void** handler, uint32_t num_requested_channels); SRSLTE_API int rf_soapy_open_multi(char* args, void** handler, uint32_t num_requested_channels);
SRSLTE_API char* rf_soapy_devname(void *h); SRSLTE_API const char* rf_soapy_devname(void* h);
SRSLTE_API int rf_soapy_close(void *h); SRSLTE_API int rf_soapy_close(void *h);

@ -226,7 +226,7 @@ wait_sensor_locked(rf_uhd_handler_t* handler, char* sensor_name, bool is_mboard,
return error; return error;
} }
char* rf_uhd_devname(void* h) const char* rf_uhd_devname(void* h)
{ {
rf_uhd_handler_t* handler = (rf_uhd_handler_t*)h; rf_uhd_handler_t* handler = (rf_uhd_handler_t*)h;
return handler->devname; return handler->devname;

@ -38,7 +38,7 @@ SRSLTE_API int rf_uhd_open_multi(char *args,
void **handler, void **handler,
uint32_t nof_channels); uint32_t nof_channels);
SRSLTE_API char* rf_uhd_devname(void *h); SRSLTE_API const char* rf_uhd_devname(void* h);
SRSLTE_API int rf_uhd_close(void *h); SRSLTE_API int rf_uhd_close(void *h);

@ -157,9 +157,9 @@ void rf_zmq_register_error_handler(void* h, srslte_rf_error_handler_t new_handle
// do nothing // do nothing
} }
char* rf_zmq_devname(void* h) const char* rf_zmq_devname(void* h)
{ {
return (char*)zmq_devname; return zmq_devname;
} }
int rf_zmq_start_rx_stream(void* h, bool now) int rf_zmq_start_rx_stream(void* h, bool now)

@ -33,7 +33,7 @@ SRSLTE_API int rf_zmq_open(char* args, void** handler);
SRSLTE_API int rf_zmq_open_multi(char* args, void** handler, uint32_t nof_channels); SRSLTE_API int rf_zmq_open_multi(char* args, void** handler, uint32_t nof_channels);
SRSLTE_API char* rf_zmq_devname(void* h); SRSLTE_API const char* rf_zmq_devname(void* h);
SRSLTE_API int rf_zmq_close(void* h); SRSLTE_API int rf_zmq_close(void* h);

Loading…
Cancel
Save