diff options
| author | Jeff Epler <jepler@gmail.com> | 2019-10-08 10:54:13 +0900 |
|---|---|---|
| committer | Jeff Epler <jepler@gmail.com> | 2019-10-08 10:54:13 +0900 |
| commit | 46b6870ffac26fc360a00120a402535ed4ee836d (patch) | |
| tree | 8959d5e57dd432ed2aa85d6581c880dca9e66ef9 | |
| parent | 0d96f1906b66139beebc13c55078aaf610c76968 (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.
| -rwxr-xr-x | py/gc.c | 1 |
1 files changed, 0 insertions, 1 deletions
@@ -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 |
