From 17f474406a2770d78b103dce7ba79a0801c31995 Mon Sep 17 00:00:00 2001 From: Alexis La Goutte Date: Tue, 27 Jul 2021 12:43:15 +0000 Subject: [PATCH] nstime: Fix Dead Store (found by Clang Analyzer) Although the value stored to 'n_scanned' is used in the enclosing expression, the value is never actually read from 'n_scanned' --- wsutil/nstime.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wsutil/nstime.c b/wsutil/nstime.c index 3561ea7994..66ec0ae634 100644 --- a/wsutil/nstime.c +++ b/wsutil/nstime.c @@ -412,7 +412,7 @@ iso8601_to_nstime(nstime_t *nstime, const char *ptr) if (*ptr == '-' || *ptr == '+' || *ptr == 'Z') { /* We have a UTC-relative offset */ if (*ptr == 'Z') { - off_hr = off_min = n_scanned = 0; + off_hr = off_min = 0; have_offset = TRUE; ptr++; } @@ -438,7 +438,7 @@ iso8601_to_nstime(nstime_t *nstime, const char *ptr) } else { /* Didn't get a valid offset, treat as if there's none at all */ - off_hr = off_min = n_scanned = 0; + off_hr = off_min = 0; have_offset = FALSE; } }