Integer overflow error

0
open
smurfix
smurfix
Posted 2 years ago

Integer overflow error #895

You might want a "long long" (1024ULL) here …

/build/lizardfs/src/src/devtools/configuration.h: In static member function ‘static long int Configuration::parseIntWithUnit(const string&)’:
/build/lizardfs/src/src/devtools/configuration.h:62:32: warning: integer overflow in expression of type ‘long int’ results in ‘0’ [-Woverflow]
   62 |     mult = 1024L * 1024 * 1024 * 1024;
      |            ~~~~~~~~~~~~~~~~~~~~^~~~~~
make[4]: Leaving directory '/build/lizardfs/src/build-pack'