add typecast to avoid (unlikely but possible) integer overflows.

this will silence a lot of static code analysis warnings
This commit is contained in:
Axel Kohlmeyer
2021-02-02 17:27:04 -05:00
parent 5196926c28
commit e2e6639013
155 changed files with 566 additions and 576 deletions

View File

@ -1147,9 +1147,9 @@ bigint FixAveChunk::nextvalid()
double FixAveChunk::memory_usage()
{
double bytes = maxvar * sizeof(double); // varatom
bytes += 4*maxchunk * sizeof(double); // count one,many,sum,total
bytes += nvalues*maxchunk * sizeof(double); // values one,many,sum,total
bytes += nwindow*maxchunk * sizeof(double); // count_list
bytes += nwindow*maxchunk*nvalues * sizeof(double); // values_list
bytes += (double)4*maxchunk * sizeof(double); // count one,many,sum,total
bytes += (double)nvalues*maxchunk * sizeof(double); // values one,many,sum,total
bytes += (double)nwindow*maxchunk * sizeof(double); // count_list
bytes += (double)nwindow*maxchunk*nvalues * sizeof(double); // values_list
return bytes;
}