Skip to content

Commit 77f63a4

Browse files
committed
Fix two warnings for comparison between signed and unsigned
1 parent 6a034ed commit 77f63a4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/wallet/rpcwallet.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2457,7 +2457,7 @@ UniValue fundrawtransaction(const UniValue& params, bool fHelp)
24572457
if (origTx.vout.size() == 0)
24582458
throw JSONRPCError(RPC_INVALID_PARAMETER, "TX must have at least one output");
24592459

2460-
if (changePosition != -1 && (changePosition < 0 || changePosition > origTx.vout.size()))
2460+
if (changePosition != -1 && (changePosition < 0 || (unsigned int)changePosition > origTx.vout.size()))
24612461
throw JSONRPCError(RPC_INVALID_PARAMETER, "changePosition out of bounds");
24622462

24632463
CMutableTransaction tx(origTx);

src/wallet/wallet.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2232,7 +2232,7 @@ bool CWallet::CreateTransaction(const vector<CRecipient>& vecSend, CWalletTx& wt
22322232
// Insert change txn at random position:
22332233
nChangePosInOut = GetRandInt(txNew.vout.size()+1);
22342234
}
2235-
else if (nChangePosInOut > txNew.vout.size())
2235+
else if ((unsigned int)nChangePosInOut > txNew.vout.size())
22362236
{
22372237
strFailReason = _("Change index out of range");
22382238
return false;

0 commit comments

Comments
 (0)