aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-json.c
diff options
context:
space:
mode:
authorAlexis La Goutte <alexis.lagoutte@gmail.com>2021-09-05 15:39:33 +0200
committerWireshark GitLab Utility <gerald+gitlab-utility@wireshark.org>2021-09-06 04:21:14 +0000
commitc58400a2edfa0c8c4a96bc75a78a41d4fb554637 (patch)
tree3b37b870e8083186e2961c6911f72f6fada16ef2 /epan/dissectors/packet-json.c
parentb007d13f572533aeace2c51ddbf61fb7aa6b2baf (diff)
json: Fix Dead Store found by Clang Analyzer
packet-json.c:365:7: warning: Value stored to 'is_valid_unicode_character' is never read [deadcode.DeadStores] packet-json.c:371:7: warning: Value stored to 'is_valid_unicode_character' is never read [deadcode.DeadStores] packet-json.c:383:8: warning: Value stored to 'is_valid_unicode_character' is never read [deadcode.DeadStores] packet-json.c:389:8: warning: Value stored to 'is_valid_unicode_character' is never read [deadcode.DeadStores]
Diffstat (limited to 'epan/dissectors/packet-json.c')
-rw-r--r--epan/dissectors/packet-json.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/epan/dissectors/packet-json.c b/epan/dissectors/packet-json.c
index a544d54f81..ba32cd4ba9 100644
--- a/epan/dissectors/packet-json.c
+++ b/epan/dissectors/packet-json.c
@@ -362,13 +362,11 @@ json_string_unescape(tvbparse_elem_t* tok, gboolean enclose_in_quotation_marks)
// Do not overflow TVB
if (!tvb_offset_exists(tok->tvb, tok->offset + read_index))
{
- is_valid_unicode_character = FALSE;
break;
}
// Do not overflow input string
if (!(read_index < tok->len))
{
- is_valid_unicode_character = FALSE;
break;
}
current_character = tvb_get_guint8(tok->tvb, tok->offset + read_index);
@@ -380,13 +378,11 @@ json_string_unescape(tvbparse_elem_t* tok, gboolean enclose_in_quotation_marks)
// Do not overflow TVB
if (!tvb_offset_exists(tok->tvb, tok->offset + read_index))
{
- is_valid_unicode_character = FALSE;
break;
}
// Do not overflow input string
if (!(read_index < tok->len))
{
- is_valid_unicode_character = FALSE;
break;
}