In the Gen2 reproject implementation we have a function calc_cal_series which uses an array of six values const FLT f[6] = {...} where only four values are specified. Is this intentional, given that the loop that happens on L56 accesses offset 4 and 5, which wouldn't have been set at initialization time.
https://github.com/cntools/libsurvive/blob/master/src/survive_reproject_gen2.c#L53.
Is this intentional? Are these parameters assumed to be zero, and if this is the case, are they guaranteed to be zeroed by C value-initialization?
I found the python code responsible for autogenerating this elsewhere in the repo and can confirm that the final two elements are intended to be zero, which is the default C value for underspecified arrays.
Describe the bug
In the Gen2 reproject implementation we have a function
calc_cal_series
which uses an array of six valuesconst FLT f[6] = {...}
where only four values are specified. Is this intentional, given that the loop that happens onL56
accesses offset4
and5
, which wouldn't have been set at initialization time. https://github.com/cntools/libsurvive/blob/master/src/survive_reproject_gen2.c#L53.Is this intentional? Are these parameters assumed to be zero, and if this is the case, are they guaranteed to be zeroed by
C
value-initialization?