Bugfix: Correct signed/unsigned warnings

This commit is contained in:
Luke Dashjr
2012-09-29 10:12:18 +00:00
parent 7f153402d6
commit 071714935b
3 changed files with 7 additions and 7 deletions

View File

@@ -179,7 +179,7 @@ void my_flip(void *data, size_t datasz) {
char *cdata = (char*)data;
--datasz;
size_t hds = datasz / 2;
for (int i = 0; i <= hds; ++i)
for (size_t i = 0; i <= hds; ++i)
{
int altp = datasz - i;
char c = cdata[i];
@@ -320,7 +320,7 @@ json_t *blkmk_submit_jansson(blktemplate_t *tmpl, const unsigned char *data, uns
return NULL;
if (!(tmpl->mutations & BMAb_COINBASE))
for (int i = 0; i < tmpl->txncount; ++i)
for (unsigned long i = 0; i < tmpl->txncount; ++i)
{
memcpy(&blk[offs], tmpl->txns[i].data, tmpl->txns[i].datasz);
offs += tmpl->txns[i].datasz;