Skip to content
Permalink
Browse files
Initialize potentially uninitialized variable tsec.
  • Loading branch information
matz committed Dec 31, 2016
1 parent 8b77979 commit 07167b8f5eb7e0ff7b4048ffcfefe9a38c904a75
Showing 1 changed file with 1 addition and 1 deletion.
@@ -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;

0 comments on commit 07167b8

Please sign in to comment.