Thomas-Tsai / partclone

Partclone provides utilities to backup a partition smartly and it is designed for higher compatibility of the file system by using existing library.
GNU General Public License v2.0
323 stars 107 forks source link

Prevent use of run-time floating point math functions for compile-time integer constants #252

Closed blanktonio closed 17 hours ago

blanktonio commented 2 days ago

Not all compilers are smart enough to evaluate pow() function and cast the result to integer at compile time, which leads to unresolved dependencies on libm at link-time. Better use standard UINTxx_C() macros for explicitly define long integer constants, and bit-shifting operations as long as powers of 2 are considered.