Skip to content

Commit

Permalink
Initialize potentially uninitialized variable tsec.
Browse files Browse the repository at this point in the history
  • Loading branch information
matz committed Dec 31, 2016
1 parent 8b77979 commit 07167b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mrbgems/mruby-time/src/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ static struct mrb_time*
time_alloc(mrb_state *mrb, double sec, double usec, enum mrb_timezone timezone)
{
struct mrb_time *tm;
time_t tsec;
time_t tsec = 0;

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

0 comments on commit 07167b8

Please sign in to comment.