aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2022-08-12 01:15:06 +0200
committerNeels Hofmeyr <neels@hofmeyr.de>2022-08-12 04:47:34 +0200
commitd4cd0a896092e5fe699a2e52b8df25bb6ff8bfda (patch)
tree2b93b35a5015e4bc2f0a31a4fe3ab4ca4068793a /src
parent5da6dbf14bdd46c5cb4c5a7400518096c56adb4b (diff)
fix warnings: 'uninitialized'
Though these can never be used uninitialized, initialize to NULL to avoid compiler warnings like: pfcp_msg.c:188:66: warning: 'h_no_seid' may be used uninitialized Change-Id: Icb338b200fe3186ccd7fd3f502c1723f60947190
Diffstat (limited to 'src')
-rw-r--r--src/libosmo-gtlv/gtlv_dec_enc.c2
-rw-r--r--src/libosmo-pfcp/pfcp_msg.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/libosmo-gtlv/gtlv_dec_enc.c b/src/libosmo-gtlv/gtlv_dec_enc.c
index 2e5509a..c3e45ea 100644
--- a/src/libosmo-gtlv/gtlv_dec_enc.c
+++ b/src/libosmo-gtlv/gtlv_dec_enc.c
@@ -71,7 +71,7 @@ static int osmo_gtlvs_decode_unordered(void *decoded_struct, unsigned int obj_of
{
void *obj = MEMB(decoded_struct, obj_ofs);
const struct osmo_gtlv_coding *iec;
- unsigned int *multi_count_p;
+ unsigned int *multi_count_p = NULL;
/* To check for presence of mandatory IEs, need to keep a flag stack of seen ie_coding entries. This array has
* to have at least the nr of entries that the ie_coding array has. Let's allow up to this many ie_coding
diff --git a/src/libosmo-pfcp/pfcp_msg.c b/src/libosmo-pfcp/pfcp_msg.c
index 5f55575..098ffa2 100644
--- a/src/libosmo-pfcp/pfcp_msg.c
+++ b/src/libosmo-pfcp/pfcp_msg.c
@@ -158,8 +158,8 @@ static unsigned int pfcp_header_get_message_length(const struct osmo_pfcp_header
static int enc_pfcp_header(struct msgb *msg, const struct osmo_pfcp_msg *m)
{
const struct osmo_pfcp_header_parsed *parsed = &m->h;
- struct osmo_pfcp_header_seid *h_seid;
- struct osmo_pfcp_header_no_seid *h_no_seid;
+ struct osmo_pfcp_header_seid *h_seid = NULL;
+ struct osmo_pfcp_header_no_seid *h_no_seid = NULL;
struct osmo_pfcp_header_common *c;
int rc;