From b78abaf1be2324e995df40d65346a96e48118204 Mon Sep 17 00:00:00 2001 From: Alexis La Goutte Date: Thu, 19 Nov 2020 19:01:53 +0000 Subject: [PATCH] windows-common: fix Clang Value stored to 'len' is never read --- epan/charsets.c | 3 +-- epan/dissectors/packet-dhcpv6.c | 2 +- epan/dissectors/packet-someip.c | 1 - epan/dissectors/packet-windows-common.c | 1 - 4 files changed, 2 insertions(+), 5 deletions(-) diff --git a/epan/charsets.c b/epan/charsets.c index dc74e80360..415b120b48 100644 --- a/epan/charsets.c +++ b/epan/charsets.c @@ -106,7 +106,6 @@ get_utf_8_string(wmem_allocator_t *scope, const guint8 *ptr, gint length) wmem_strbuf_t *str; guint8 ch; const guint8 *prev; - gsize unichar_len; str = wmem_strbuf_sized_new(scope, length+1, 0); @@ -115,8 +114,8 @@ get_utf_8_string(wmem_allocator_t *scope, const guint8 *ptr, gint length) * Table 3-7 "Well-Formed UTF-8 Byte Sequences" and * U+FFFD Substitution of Maximal Subparts. */ while (length > 0) { + gsize unichar_len; ch = *ptr; - unichar_len = 1; if (ch < 0x80) { wmem_strbuf_append_c(str, ch); diff --git a/epan/dissectors/packet-dhcpv6.c b/epan/dissectors/packet-dhcpv6.c index 7a5f9daa52..9a4761f52c 100644 --- a/epan/dissectors/packet-dhcpv6.c +++ b/epan/dissectors/packet-dhcpv6.c @@ -2469,7 +2469,7 @@ dhcpv6_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, guint8 flags; proto_item *fi = NULL; proto_tree *flags_tree = NULL; - char *flags_str, *suffix; + char *flags_str= NULL, *suffix; gboolean is_client; proto_item *exi; proto_tree *ex_subtree; diff --git a/epan/dissectors/packet-someip.c b/epan/dissectors/packet-someip.c index 2db77c1b1d..3588a37aea 100644 --- a/epan/dissectors/packet-someip.c +++ b/epan/dissectors/packet-someip.c @@ -2564,7 +2564,6 @@ dissect_someip_payload(tvbuff_t* tvb, packet_info* pinfo, proto_item *ti, guint1 if (offset_bits != 0) { /* allign to byte */ offset += 1; - offset_bits = 0; } if (length > offset) { diff --git a/epan/dissectors/packet-windows-common.c b/epan/dissectors/packet-windows-common.c index 1c042f3c79..713c9aa776 100644 --- a/epan/dissectors/packet-windows-common.c +++ b/epan/dissectors/packet-windows-common.c @@ -2104,7 +2104,6 @@ dissect_nt_conditional_ace_token(tvbuff_t *tvb, int offset, guint16 size, proto_ break; case COND_ACE_TOKEN_SID: - len = tvb_get_letohl(tvb, offset); /* in bytes */ offset += sizeof(len); offset = dissect_nt_sid(tvb, offset, tree, "SID", NULL, -1);