From 853c271f22d2f01a0a4a78822592206635fe6112 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sat, 16 Jan 2021 18:12:51 +0100 Subject: [PATCH] Fix gcc warning; variable vidx is assigned but not read --- lib/checkbufferoverrun.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/checkbufferoverrun.cpp b/lib/checkbufferoverrun.cpp index 6f2b53a74..5ba752d33 100644 --- a/lib/checkbufferoverrun.cpp +++ b/lib/checkbufferoverrun.cpp @@ -887,11 +887,9 @@ void CheckBufferOverrun::objectIndex() const Token *idx = tok->astOperand2(); if (!idx || !obj) continue; - const ValueFlow::Value* vidx = nullptr; if (idx->hasKnownIntValue()) { if (idx->getKnownIntValue() == 0) continue; - vidx = &idx->values().front(); } if (idx->hasKnownIntValue() && idx->getKnownIntValue() == 0) continue;