Fix uninitialized variables.

This commit is contained in:
Gunnar Beutner 2013-05-03 12:44:27 +02:00
parent 1e9dcb35b4
commit 1d6e1c205f

View File

@ -159,7 +159,7 @@ void LegacyTimePeriod::ParseTimeSpec(const String& timespec, tm *begin, tm *end,
std::vector<String> tokens;
boost::algorithm::split(tokens, timespec, boost::is_any_of(" "));
int mon;
int mon = -1;
if (tokens.size() > 1 && (tokens[0] == "day" || (mon = MonthFromString(tokens[0])) != -1)) {
if (mon == -1)
@ -214,7 +214,7 @@ void LegacyTimePeriod::ParseTimeSpec(const String& timespec, tm *begin, tm *end,
myref.tm_mon = mon;
}
int n;
int n = 0;
if (tokens.size() > 1)
n = Convert::ToLong(tokens[1]);