diff --git a/lib/checkbufferoverrun.cpp b/lib/checkbufferoverrun.cpp index 13b5e42d9..4c4894777 100644 --- a/lib/checkbufferoverrun.cpp +++ b/lib/checkbufferoverrun.cpp @@ -1872,7 +1872,7 @@ CheckBufferOverrun::ArrayInfo & CheckBufferOverrun::ArrayInfo::operator=(const C * this will not be needed as the declare can be used instead. */ CheckBufferOverrun::ArrayInfo::ArrayInfo(unsigned int id, const std::string &name, MathLib::bigint size1, MathLib::bigint n) - : _element_size(size1), _varid(id), _varname(name) + : _varname(name), _element_size(size1), _varid(id) { _num.push_back(n); } diff --git a/lib/checkother.cpp b/lib/checkother.cpp index 4c9f7e75f..922c3f504 100644 --- a/lib/checkother.cpp +++ b/lib/checkother.cpp @@ -595,7 +595,7 @@ void CheckOther::checkSizeofForPointerSize() // Jump to the next sizeof token in the function and in the parameter // This is to allow generic operations with sizeof - for (; tokVar && tokVar->str() != ")" && tokVar->str() != "," && tokVar->str() != "sizeof"; tokVar = tokVar->next()); + for (; tokVar && tokVar->str() != ")" && tokVar->str() != "," && tokVar->str() != "sizeof"; tokVar = tokVar->next()) {} // Now check for the sizeof usage. Once here, everything using sizeof(varid) // looks suspicious