Skip to content

Commit 07167b8

Browse files
committed
Initialize potentially uninitialized variable tsec.
1 parent 8b77979 commit 07167b8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mrbgems/mruby-time/src/time.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ static struct mrb_time*
217217
time_alloc(mrb_state *mrb, double sec, double usec, enum mrb_timezone timezone)
218218
{
219219
struct mrb_time *tm;
220-
time_t tsec;
220+
time_t tsec = 0;
221221

222222
if (sizeof(time_t) == 4 && (sec > (double)INT32_MAX || (double)INT32_MIN > sec)) {
223223
goto out_of_range;

0 commit comments

Comments
 (0)