summaryrefslogtreecommitdiff
path: root/epan/dissectors/file-elf.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2014-12-03 11:03:23 -0800
committerGuy Harris <guy@alum.mit.edu>2014-12-03 19:03:56 +0000
commitb088ca5efd46d07aa36f344a7c39b9b8d038ff5d (patch)
tree81bea0b458639e7a780aa0524360264e90c6f44c /epan/dissectors/file-elf.c
parentdb462ceb1b6d7a0348583c9ae7a8c68484c6b7c6 (diff)
downloadwireshark-b088ca5efd46d07aa36f344a7c39b9b8d038ff5d.tar.gz
Squelch some "can't happen in reality" warnings.
(I guess newer versions of GCC/Clang know that dissect_eh_frame() is never called with a segment_size of 0, so the loop is traversed at least once. NOTE: if it ever *is* called with a segment_size of 0, then that's a genuine bug and needs to be fixed.) Also, segment_size is used; no need to mark it as unused. Change-Id: I63b7a580a853b55f22494de73b4c4e6f9a387647 Reviewed-on: https://code.wireshark.org/review/5591 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/dissectors/file-elf.c')
-rw-r--r--epan/dissectors/file-elf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/epan/dissectors/file-elf.c b/epan/dissectors/file-elf.c
index 259d71360c..f1769d7e6a 100644
--- a/epan/dissectors/file-elf.c
+++ b/epan/dissectors/file-elf.c
@@ -958,16 +958,16 @@ dissect_eh_frame_hdr(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *segment_
static gint
dissect_eh_frame(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *segment_tree,
- gint offset, gint segment_size _U_, gint register_size _U_, guint machine_encoding)
+ gint offset, gint segment_size, gint register_size _U_, guint machine_encoding)
{
proto_tree *cfi_tree = NULL;
proto_item *cfi_tree_item = NULL;
proto_tree *entry_tree;
- proto_item *pi;
+ proto_item *pi = NULL;
guint64 length;
guint lengths_size;
gboolean is_cie;
- guint entry_size, entry_end;
+ guint entry_size, entry_end = 0;
guint cfi_size = 0;
guint64 unsigned_value;
gint64 signed_value;