"warning: comparison of unsigned expression < 0 is always false" in PerformNameRawtx
Closed this issue · 2 comments
yanmaani commented
Error was introduced in c145682:
void
PerformNameRawtx (const unsigned nOut, const UniValue& nameOp,
CMutableTransaction& mtx, UniValue& result)
{
mtx.SetNamecoin ();
if (nOut < 0 || nOut >= mtx.vout.size ())
throw JSONRPCError (RPC_INVALID_PARAMETER, "vout is out of range");
Since nOut
is unsigned, the compiler warns that the first check is not needed.
Fix seems easy, but I'm not familiar with this part of the codebase.
domob1812 commented
Indeed, I'll take care of it when doing the next upstream merge.