summaryrefslogtreecommitdiffstats
path: root/openbsc/src/libmsc
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2018-06-15 16:25:51 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2018-06-15 16:25:53 +0200
commite65eb4ccb54db022e6e4310cf99d84c64727a924 (patch)
tree831ed859d203674c05c36ee0fad61b6a248ce592 /openbsc/src/libmsc
parent28c4a62a7c1069ec257368230f62cf69e0da95a8 (diff)
gsm0408_dispatch: Fix uninitialized var warning
Got this warning since my upgrade to gcc 8.1.0. Quick check tells me it's probably a false positive, but let's fix the warning anyway. openbsc/openbsc/src/libmsc/gsm_04_08.c: In function ‘gsm0408_dispatch’: openbsc/openbsc/src/libmsc/gsm_04_08.c:1260:5: error: ‘res_len’ may be used uninitialized in this function [-Werror=maybe-uninitialized] if (res_len != 4) { ^ openbsc/openbsc/src/libmsc/gsm_04_08.c:1223:10: note: ‘res_len’ was declared here uint8_t res_len; ^~~~~~~ Change-Id: Ifa45f73645c9ab022c18a012abe03214aa21526f
Diffstat (limited to 'openbsc/src/libmsc')
-rw-r--r--openbsc/src/libmsc/gsm_04_08.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/openbsc/src/libmsc/gsm_04_08.c b/openbsc/src/libmsc/gsm_04_08.c
index 006de7fd2..09e35cce2 100644
--- a/openbsc/src/libmsc/gsm_04_08.c
+++ b/openbsc/src/libmsc/gsm_04_08.c
@@ -1220,7 +1220,7 @@ static int gsm48_rx_mm_auth_resp(struct gsm_subscriber_connection *conn, struct
{
struct gsm_network *net = conn->network;
uint8_t res[16];
- uint8_t res_len;
+ uint8_t res_len = 0;
int rc;
bool is_r99;