From 46b6870ffac26fc360a00120a402535ed4ee836d Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Tue, 8 Oct 2019 10:54:13 +0900 Subject: [PATCH] gc_alloc: Remove redundant 'collected' assignment The remaining assignment was added in upstream micropython; the deleted assignment was added in circuitpython as part of the long-lived object area feature. During the merge, the redundant assignment was not removed. (since collected is a local variable and no pointers to it escape, it doesn't seem possible for the placement of the assignment before or after GC_ENTER() is important) This diagnostic was found by clang 7's scan-build static analyzer. --- py/gc.c | 1 - 1 file changed, 1 deletion(-) diff --git a/py/gc.c b/py/gc.c index 10b36950c4..ac584d5d20 100755 --- a/py/gc.c +++ b/py/gc.c @@ -509,7 +509,6 @@ void *gc_alloc(size_t n_bytes, bool has_finaliser, bool long_lived) { gc_collect(); collected = 1; GC_ENTER(); - collected = true; } #endif