diff --git a/src/cc/cclib.cpp b/src/cc/cclib.cpp index 695ccd16b..3a6fba108 100644 --- a/src/cc/cclib.cpp +++ b/src/cc/cclib.cpp @@ -506,7 +506,7 @@ int64_t AddCClibInputs(struct CCcontract_info *cp,CMutableTransaction &mtx,CPubK int64_t AddCClibtxfee(struct CCcontract_info *cp,CMutableTransaction &mtx,CPubKey pk) { - char coinaddr[64]; int64_t txfee = 10000; uint256 txid,hashBlock; CTransaction vintx; int32_t vout; + char coinaddr[64]; int64_t nValue,txfee = 10000; uint256 txid,hashBlock; CTransaction vintx; int32_t vout; std::vector > unspentOutputs; GetCCaddress(cp,coinaddr,pk); SetCCunspents(unspentOutputs,coinaddr); diff --git a/src/cc/dilithium.c b/src/cc/dilithium.c index 4136b0bca..8cfc85028 100644 --- a/src/cc/dilithium.c +++ b/src/cc/dilithium.c @@ -2941,10 +2941,10 @@ struct dilithium_handle *dilithium_handlenew(std::string handle) struct dilithium_handle *hashstr = 0; if ( handle.size() < sizeof(Dilithium_handles[0].handle)-1 ) { - HASH_FIND(hh,Dilithium_handles,handle,(int32_t)handle.size(),hashstr); + HASH_FIND(hh,Dilithium_handles,handle.c_str(),(int32_t)handle.size(),hashstr); if ( hashstr == 0 ) { - hashstr = calloc(1,sizeof(*hashstr)); + hashstr = (struct dilithium_handle *)calloc(1,sizeof(*hashstr)); strncpy(hashstr->handle,handle.c_str(),sizeof(hashstr->handle)); HASH_ADD_KEYPTR(hh,Dilithium_handles,hashstr->handle,(int32_t)handle.size(),hashstr); }