summaryrefslogtreecommitdiff
path: root/py/gc.c
diff options
context:
space:
mode:
authorJeff Epler <jepler@gmail.com>2019-10-08 10:54:13 +0900
committerJeff Epler <jepler@gmail.com>2019-10-08 10:54:13 +0900
commit46b6870ffac26fc360a00120a402535ed4ee836d (patch)
tree8959d5e57dd432ed2aa85d6581c880dca9e66ef9 /py/gc.c
parent0d96f1906b66139beebc13c55078aaf610c76968 (diff)
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.
Diffstat (limited to 'py/gc.c')
-rwxr-xr-xpy/gc.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/py/gc.c b/py/gc.c
index 10b36950c..ac584d5d2 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