Message 143757 - Python tracker (original) (raw)
In uint32_converter, I'm not sure the if statement comparing val and UINT32_MAX makes sense. val was defined to be unsigned long, which is 32bit on 32-bit compiler.
Yes, on a 32-bit system, this comparison will always be false. However, on a 64-bit system, an unsigned long will (usually) be 64 bits wide. In this case, we do need to check that the value fits into a uint32_t.