diff --git a/lib/include/srslte/common/move_callback.h b/lib/include/srslte/common/move_callback.h index 0f6b5afbb..5f1a29569 100644 --- a/lib/include/srslte/common/move_callback.h +++ b/lib/include/srslte/common/move_callback.h @@ -23,7 +23,10 @@ #define SRSLTE_MOVE_CALLBACK_H #include +#include +#include #include +#include #include #if defined(__cpp_exceptions) && (1 == __cpp_exceptions) diff --git a/lib/src/phy/fec/viterbi37_avx2_16bit.c b/lib/src/phy/fec/viterbi37_avx2_16bit.c index 643284f6b..9f0aaabaa 100644 --- a/lib/src/phy/fec/viterbi37_avx2_16bit.c +++ b/lib/src/phy/fec/viterbi37_avx2_16bit.c @@ -43,7 +43,7 @@ union branchtab27 { } Branchtab37_sse2[3]; -int firstGo; +int firstGo_16bit; /* State info for instance of Viterbi decoder */ struct v37 { 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; clear_v37_avx2_16bit(vp); - firstGo = 1; + firstGo_16bit = 1; vp->old_metrics = &vp->metrics1; vp->new_metrics = &vp->metrics2; vp->dp = vp->decisions; diff --git a/lib/src/phy/rf/rf_helper.h b/lib/src/phy/rf/rf_helper.h index 0feef655d..b3609ac5d 100644 --- a/lib/src/phy/rf/rf_helper.h +++ b/lib/src/phy/rf/rf_helper.h @@ -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); } - strncpy(param_dst, config_str, RF_PARAM_LEN); - param_dst[RF_PARAM_LEN - 1] = 0; + if (snprintf(param_dst, RF_PARAM_LEN, "%s", config_str) < 0) { + return SRSLTE_ERROR; + } // 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};