Merge pull request #1951 from Griffon26/coverity_fixes

C++ runtime: Fix two issues found by coverity
This commit is contained in:
Terence Parr 2017-10-27 10:45:26 -07:00 committed by GitHub
commit 1f8c5bdf6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 2 deletions

View File

@ -166,4 +166,5 @@ YYYY/MM/DD, github id, Full name, email
2017/09/11, sachinjain024, Sachin Jain, sachinjain024@gmail.com 2017/09/11, sachinjain024, Sachin Jain, sachinjain024@gmail.com
2017/10/06, bramp, Andrew Brampton, brampton@gmail.com 2017/10/06, bramp, Andrew Brampton, brampton@gmail.com
2017/10/15, simkimsia, Sim Kim Sia, kimcity@gmail.com 2017/10/15, simkimsia, Sim Kim Sia, kimcity@gmail.com
2017/10/27, Griffon26, Maurice van der Pot, griffon26@kfk4ever.com
2017/05/29, rlfnb, Ralf Neeb, rlfnb@rlfnb.de 2017/05/29, rlfnb, Ralf Neeb, rlfnb@rlfnb.de

View File

@ -101,7 +101,7 @@ size_t LexerActionExecutor::generateHashCode() const {
for (auto lexerAction : _lexerActions) { for (auto lexerAction : _lexerActions) {
hash = MurmurHash::update(hash, lexerAction); hash = MurmurHash::update(hash, lexerAction);
} }
MurmurHash::finish(hash, _lexerActions.size()); hash = MurmurHash::finish(hash, _lexerActions.size());
return hash; return hash;
} }

View File

@ -44,6 +44,8 @@ IntervalSet::IntervalSet(int n, ...) : IntervalSet() {
for (int i = 0; i < n; i++) { for (int i = 0; i < n; i++) {
add(va_arg(vlist, int)); add(va_arg(vlist, int));
} }
va_end(vlist);
} }
IntervalSet::~IntervalSet() IntervalSet::~IntervalSet()