summaryrefslogtreecommitdiff
path: root/typd_mlc.c
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2022-12-05 08:52:11 +0300
committerIvan Maidanski <ivmai@mail.ru>2022-12-05 14:08:40 +0300
commitec1607a2251411cd4a23238f32aee6ef26ced224 (patch)
tree28b775d1b67a205cad6f4e6853c7245eee3b7e67 /typd_mlc.c
parent9d1e3cc65d25c7ba725e11ca82dab1a476607bea (diff)
downloadbdwgc-ec1607a2251411cd4a23238f32aee6ef26ced224.tar.gz
Eliminate 'assigned value is garbage or undefined' CSA warning
(fix of commit 1f45c9a9f) * typd_mlc.c (GC_make_array_descriptor): Do not dereference pcomplex_d after GC_make_array_descriptor() recursive call unless result is COMPLEX.
Diffstat (limited to 'typd_mlc.c')
-rw-r--r--typd_mlc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/typd_mlc.c b/typd_mlc.c
index 56f14632..758255d2 100644
--- a/typd_mlc.c
+++ b/typd_mlc.c
@@ -471,8 +471,9 @@ STATIC int GC_make_array_descriptor(size_t nelements, size_t size,
one_element = GC_make_leaf_descriptor(size, 1, d);
if (EXPECT(NULL == one_element, FALSE)) return NO_MEM;
- beginning = *pcomplex_d;
- if (result != COMPLEX) {
+ if (COMPLEX == result) {
+ beginning = *pcomplex_d;
+ } else {
beginning = SIMPLE == result ?
GC_make_leaf_descriptor(size, 1, *psimple_d) :
GC_make_leaf_descriptor(pleaf -> ld_size,