From 2fe4fd8a886398ccc6111bb9ae769b555896fc62 Mon Sep 17 00:00:00 2001 From: jmayer Date: Tue, 28 Feb 2012 17:44:49 +0000 Subject: [PATCH] =?utf8?q?Fix=20several=20messages=20of=20type:=20epan/tvb?= =?utf8?q?uff.c:=20In=20function=20=E2=80=98tvb=5Fget=5Fbits16=E2=80=99:?= =?utf8?q?=20epan/tvbuff.c:1736:82:=20error:=20unused=20parameter=20?= =?utf8?q?=E2=80=98encoding=E2=80=99=20[-Werror=3Dunused-parameter]?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Compilation still fails with: epan/tvbuff.c: In function ‘_tvb_get_bits64’: epan/tvbuff.c:1829:19: error: ‘value’ may be used uninitialized in this function [-Werror=uninitialized git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@41227 f5534014-38df-0310-8fa8-9805f1628bb7 --- epan/tvbuff.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/epan/tvbuff.c b/epan/tvbuff.c index e9f2283857..5a630deef9 100644 --- a/epan/tvbuff.c +++ b/epan/tvbuff.c @@ -1733,7 +1733,7 @@ ep_tvb_get_bits(tvbuff_t *tvb, gint bit_offset, gint no_of_bits, gboolean lsb0) /* Get 9 - 16 bits */ guint16 -tvb_get_bits16(tvbuff_t *tvb, gint bit_offset, const gint no_of_bits,const guint encoding) +tvb_get_bits16(tvbuff_t *tvb, gint bit_offset, const gint no_of_bits,const guint encoding _U_) { /* note that encoding has no meaning here, as the tvb is considered to contain an octet array */ return (guint16)_tvb_get_bits64(tvb, bit_offset, no_of_bits); @@ -1741,7 +1741,7 @@ tvb_get_bits16(tvbuff_t *tvb, gint bit_offset, const gint no_of_bits,const guint /* Get 1 - 32 bits */ guint32 -tvb_get_bits32(tvbuff_t *tvb, gint bit_offset, const gint no_of_bits, const guint encoding) +tvb_get_bits32(tvbuff_t *tvb, gint bit_offset, const gint no_of_bits, const guint encoding _U_) { /* note that encoding has no meaning here, as the tvb is considered to contain an octet array */ return (guint32)_tvb_get_bits64(tvb, bit_offset, no_of_bits); @@ -1749,7 +1749,7 @@ tvb_get_bits32(tvbuff_t *tvb, gint bit_offset, const gint no_of_bits, const guin /* Get 1 - 64 bits */ guint64 -tvb_get_bits64(tvbuff_t *tvb, gint bit_offset, const gint no_of_bits, const guint encoding) +tvb_get_bits64(tvbuff_t *tvb, gint bit_offset, const gint no_of_bits, const guint encoding _U_) { /* note that encoding has no meaning here, as the tvb is considered to contain an octet array */ return _tvb_get_bits64(tvb, bit_offset, no_of_bits); @@ -1760,7 +1760,7 @@ tvb_get_bits64(tvbuff_t *tvb, gint bit_offset, const gint no_of_bits, const guin * Offset should be given in bits from the start of the tvb. * The function tolerates requests for more than 64 bits, but will only return the least significant 64 bits. */ -static guint64 +static guint64 _tvb_get_bits64(tvbuff_t *tvb, gint bit_offset, const gint total_no_of_bits) { guint64 value; @@ -1784,7 +1784,7 @@ _tvb_get_bits64(tvbuff_t *tvb, gint bit_offset, const gint total_no_of_bits) value = tvb_get_guint8(tvb, octet_offset) & bit_mask8[required_bits_in_first_octet]; remaining_bit_length -= required_bits_in_first_octet; octet_offset ++; - } + } /* take the biggest words, shorts or octets that we can */ while (remaining_bit_length > 7) { @@ -1834,7 +1834,7 @@ _tvb_get_bits64(tvbuff_t *tvb, gint bit_offset, const gint total_no_of_bits) } /* Get 1 - 32 bits (should be deprecated as same as tvb_get_bits32??) */ guint32 -tvb_get_bits(tvbuff_t *tvb, const gint bit_offset, const gint no_of_bits, const guint encoding) +tvb_get_bits(tvbuff_t *tvb, const gint bit_offset, const gint no_of_bits, const guint encoding _U_) { /* note that encoding has no meaning here, as the tvb is considered to contain an octet array */ return (guint32)_tvb_get_bits64(tvb, bit_offset, no_of_bits); -- 2.34.1