lcn2 / calc

C-style arbitrary precision calculator
http://www.isthe.com/chongo/tech/comp/calc/index.html
Other
346 stars 52 forks source link

Remove redundant assignments when byteswapping #25

Closed atsampson closed 3 years ago

atsampson commented 3 years ago

The SWAP_ macros already write the result to their destination arg, so there's no need for an extra assignment -- and this is undefined behaviour because there are two assignments to the same variable without an intervening sequence point.

GCC 10.2 warns about this when compiling on 32-bit ARM.