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

@@ -36,14 +36,14 @@ static const char *capnames[] = {
};
const char *blktmpl_capabilityname(gbt_capabilities_t caps) {
for (int i = 0; i < sizeof(capnames); ++i)
for (unsigned int i = 0; i < sizeof(capnames); ++i)
if (caps & (1 << i))
return capnames[i];
return NULL;
}
gbt_capabilities_t blktmpl_getcapability(const char *n) {
for (int i = 0; i < sizeof(capnames); ++i)
for (unsigned int i = 0; i < sizeof(capnames); ++i)
if (capnames[i] && !strcasecmp(n, capnames[i]))
return 1 << i;
return 0;
@@ -90,7 +90,7 @@ void blktxn_free(struct blktxn_t *bt) {
}
void blktmpl_free(blktemplate_t *tmpl) {
for (int i = 0; i < tmpl->txncount; ++i)
for (unsigned long i = 0; i < tmpl->txncount; ++i)
blktxn_free(&tmpl->txns[i]);
free(tmpl->txns);
if (tmpl->cbtxn)