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;
隐蔽的数据溢出问题
最新推荐文章于 2024-04-15 09:45:49 发布