The variable `i` is not used inside this loop, and it later unconditionally set to 0. Found by clang-analyzer. Signed-off-by: Christian Göttsche <cgzones@xxxxxxxxxxxxxx> --- libselinux/src/context.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libselinux/src/context.c b/libselinux/src/context.c index ce425880..b2144c7c 100644 --- a/libselinux/src/context.c +++ b/libselinux/src/context.c @@ -37,7 +37,7 @@ context_t context_new(const char *str) } n->current_str = n->component[0] = n->component[1] = n->component[2] = n->component[3] = 0; - for (i = count = 0, p = str; *p; p++) { + for (count = 0, p = str; *p; p++) { switch (*p) { case ':': count++; -- 2.31.1