After this commit, "-Wall" only produces two warnings on my platform.
This was sent under a separate cover because it deserves additional review. It changes (slightly) the usage of some serialized objects in a hopefully-superficial way.
After this commit, "-Wall" only produces two warnings on my platform.
This was sent under a separate cover because it deserves additional review. It changes (slightly) the usage of some serialized objects in a hopefully-superficial way.
It is defined as a 'unsigned int' and our first valid value is 1.
175 | @@ -176,8 +176,8 @@ class CInPoint 176 | 177 | CInPoint() { SetNull(); } 178 | CInPoint(CTransaction* ptxIn, unsigned int nIn) { ptx = ptxIn; n = nIn; } 179 | - void SetNull() { ptx = NULL; n = -1; }
You can't change the binary serialization of these, as they are part of the network protocol (coinbase transactions use an IsNull() COutPoint as input). Using 0xFFFFFFFF as initialization/test value works fine.
At least n = -1 is undefined, as n is defined as unsigned.
"unsigned int n = -1" is not undefined, but has a well understood behavior.
Sorry for my nescience, the value is then 2^32 - 1, right?
Yes, 0xFFFFFFFF as sipa noted.