aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/bts.cpp2
-rw-r--r--src/gprs_bssgp_pcu.c7
2 files changed, 5 insertions, 4 deletions
diff --git a/src/bts.cpp b/src/bts.cpp
index 95dde047..ee6b915a 100644
--- a/src/bts.cpp
+++ b/src/bts.cpp
@@ -856,7 +856,7 @@ int bts_rcv_rach(struct gprs_rlcmac_bts *bts, const struct rach_ind_params *rip)
struct chan_req_params chan_req = { 0 };
struct gprs_rlcmac_ul_tbf *tbf = NULL;
struct gprs_rlcmac_sba *sba;
- uint8_t trx_no, ts_no;
+ uint8_t trx_no = 0, ts_no = 0; /* initialize to avoid uninitialized false warnings on some gcc versions (11.1.0) */
uint32_t sb_fn = 0;
uint8_t usf = 7;
uint8_t tsc = 0;
diff --git a/src/gprs_bssgp_pcu.c b/src/gprs_bssgp_pcu.c
index 0e8e1459..e2f6f519 100644
--- a/src/gprs_bssgp_pcu.c
+++ b/src/gprs_bssgp_pcu.c
@@ -1075,12 +1075,13 @@ static int ns_configure_nse(struct gprs_rlcmac_bts *bts,
const uint16_t *nsvci,
uint16_t valid)
{
- int i, rc;
+ unsigned int i;
+ int rc;
uint16_t binds = 0;
bool nsvcs = false;
struct gprs_ns2_vc *nsvc;
struct gprs_ns2_vc_bind *bind[PCU_IF_NUM_NSVC] = { };
- char name[5];
+ char name[16];
bool sns_configured = false;
if (!valid)
@@ -1100,7 +1101,7 @@ static int ns_configure_nse(struct gprs_rlcmac_bts *bts,
continue;
if (!gprs_ns2_ip_bind_by_sockaddr(the_pcu->nsi, &local[i])) {
- snprintf(name, sizeof(name), "pcu%d", i);
+ snprintf(name, sizeof(name), "pcu%u", i);
rc = gprs_ns2_ip_bind(the_pcu->nsi, name, &local[i], 0, &bind[i]);
if (rc < 0) {
LOGP(DBSSGP, LOGL_ERROR, "Failed to bind to %s\n", osmo_sockaddr_to_str(&local[i]));