aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2019-01-20 15:10:04 +0100
committerHarald Welte <laforge@gnumonks.org>2019-01-20 15:11:07 +0100
commit2c880ba6f4a0f6e67ee95fdbabd7ccb5f4797194 (patch)
tree0d315e5771697421e05b5a8a134b6648a3f6d99f
parent069b20dd6ef4851ce993b523d11775e8bbae15c0 (diff)
sccp.c: Fix gcc-8.2 -Werror=maybe-uninitialized
This fixes the following compiler warning when using -Werror on gcc-8.2: sccp.c: In function ‘sccp_system_incoming_ctx’: sccp.c:1039:10: error: ‘result.destination_local_reference’ may be used uninitialized in this function [-Werror=maybe-uninitialized] && memcmp(&conn->source_local_reference, result.destination_local_reference, sizeof(conn->source_local_reference)) == 0 sccp.c:1030:27: note: ‘result.destination_local_reference’ was declared here struct sccp_parse_result result; ^~~~~~ Change-Id: Ied41f7c8ddaa5f616dd6556079a54d8d70274490
-rw-r--r--src/sccp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sccp.c b/src/sccp.c
index 8c3641c..ec0f3b7 100644
--- a/src/sccp.c
+++ b/src/sccp.c
@@ -1027,7 +1027,7 @@ static int _sccp_handle_connection_request(struct msgb *msgb, void *ctx)
/* Handle the release confirmed */
static int _sccp_handle_connection_release_complete(struct msgb *msgb)
{
- struct sccp_parse_result result;
+ struct sccp_parse_result result = {};
struct sccp_connection *conn;
if (_sccp_parse_connection_release_complete(msgb, &result) != 0)