Commit 6ba9306
committed
Fix: init var that's otherwise accessed uninit'd (#207)
This commit initializes a variable ("format") that can be read
uninitialized. There are no negative manifestations of this issue.
The var carries the type of time format that has been detected when
parssing a string input value, which would subsequently be converted to
a TIME/DATE/TIMESTAMP data type. In case the source is a string
representing a TIMESTAMP and the destination a DATE, the representation
of the destination is obtained from the original input, by zero-ing the
time part (since this is how DATEs are represented in ES/SQL) and the
"format" var decides, in a disjunction with another variable, on this
action.
In case the source is of the type DATE and the destination also a DATE,
the "format" var would not be set, but its value read. In the case the
random value the var can take matches the condition, a zero'ing of an
already zero'd string would happen, with no other side-effect.
(cherry picked from commit d1392c7)1 parent a5d8cad commit 6ba9306
1 file changed
+1
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4387 | 4387 | | |
4388 | 4388 | | |
4389 | 4389 | | |
| 4390 | + | |
4390 | 4391 | | |
4391 | 4392 | | |
4392 | 4393 | | |
| |||
0 commit comments