unsigned int blocks = 20000; unsigned int blocksize = 5000; int64_t totalsize; // overflow, error!! totalsize = blocks * blocksize; // mandatory type transfer, right! totalsize = (int64_t)blocks * blocksize;