Small compilation fixes for GCC 10.1

master
Pedro Alvarez 5 years ago
parent 7713df2cf9
commit 6ce33c3812

@ -23,7 +23,10 @@
#define SRSLTE_MOVE_CALLBACK_H #define SRSLTE_MOVE_CALLBACK_H
#include <cstddef> #include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <functional> #include <functional>
#include <stdint.h>
#include <type_traits> #include <type_traits>
#if defined(__cpp_exceptions) && (1 == __cpp_exceptions) #if defined(__cpp_exceptions) && (1 == __cpp_exceptions)

@ -43,7 +43,7 @@ union branchtab27 {
} Branchtab37_sse2[3]; } Branchtab37_sse2[3];
int firstGo; int firstGo_16bit;
/* State info for instance of Viterbi decoder */ /* State info for instance of Viterbi decoder */
struct v37 { struct v37 {
metric_t metrics1; /* path metric buffer 1 */ metric_t metrics1; /* path metric buffer 1 */
@ -85,7 +85,7 @@ int init_viterbi37_avx2_16bit(void* p, int starting_state)
vp->metrics1.c[i] = 63; vp->metrics1.c[i] = 63;
clear_v37_avx2_16bit(vp); clear_v37_avx2_16bit(vp);
firstGo = 1; firstGo_16bit = 1;
vp->old_metrics = &vp->metrics1; vp->old_metrics = &vp->metrics1;
vp->new_metrics = &vp->metrics2; vp->new_metrics = &vp->metrics2;
vp->dp = vp->decisions; vp->dp = vp->decisions;

@ -82,8 +82,9 @@ static inline int parse_string(char* args, const char* config_arg_base, int chan
printf("CHx %s=%s\n", config_arg_base, config_str); printf("CHx %s=%s\n", config_arg_base, config_str);
} }
strncpy(param_dst, config_str, RF_PARAM_LEN); if (snprintf(param_dst, RF_PARAM_LEN, "%s", config_str) < 0) {
param_dst[RF_PARAM_LEN - 1] = 0; return SRSLTE_ERROR;
}
// concatenate key=value and remove both (avoid removing the same value twice if it occurs twice in rf_args) // concatenate key=value and remove both (avoid removing the same value twice if it occurs twice in rf_args)
char config_pair[RF_PARAM_LEN * 2] = {0}; char config_pair[RF_PARAM_LEN * 2] = {0};

Loading…
Cancel
Save