From 7ae1c683f3024d0aea292cf6b853ebb79e71b06c Mon Sep 17 00:00:00 2001 From: Dario Lombardo Date: Fri, 8 Jun 2018 08:57:02 +0200 Subject: [PATCH] s101: add initializer. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ../epan/dissectors/packet-s101.c: In function ‘dissect_S101’: ../epan/dissectors/packet-s101.c:279:53: error: ‘app_bytes_len’ may be used uninitialized in this function [-Werror=maybe-uninitialized] ((*flags & 0xF) || (S101_DTD_GLOW != *dtd) || (APP_BYTES_LEN != app_bytes_len)))) { ^ ../epan/dissectors/packet-s101.c:241:12: note: ‘app_bytes_len’ was declared here guint8 app_bytes_len; ^ cc1: all warnings being treated as errors Change-Id: Ibc7ab9206aeda2afe895a1813e7d4cb196b41817 Reviewed-on: https://code.wireshark.org/review/28105 Petri-Dish: Dario Lombardo Reviewed-by: Pascal Quantin --- epan/dissectors/packet-s101.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epan/dissectors/packet-s101.c b/epan/dissectors/packet-s101.c index f43e8cc194..9cbb321909 100755 --- a/epan/dissectors/packet-s101.c +++ b/epan/dissectors/packet-s101.c @@ -238,7 +238,7 @@ static int find_s101_packet_header(tvbuff_t *tvb, int* offset, guint8 *start, guint8 *slot, guint8 *message, guint8 *version, guint8 *dtd, guint8 *command, guint8 *flags, guint8* app_bytes, guint64 *msgLength, guint16 *crc) { - guint8 app_bytes_len; + guint8 app_bytes_len = 0; int i; *start = tvb_get_guint8(tvb, *offset); // no CRC and no escaping on first bytes.