Browse Source

Fix more printf-format non-compatibilities

Discovered with Apple GCC for Mac
Luke Dashjr 13 years ago
parent
commit
27b385b781
2 changed files with 3 additions and 2 deletions
  1. 2 1
      libztex.c
  2. 1 1
      miner.c

+ 2 - 1
libztex.c

@@ -242,7 +242,8 @@ static enum check_result libztex_checkDevice(struct libusb_device *dev)
 	fp = NULL;
 
 	if (got_bytes < length) {
-		applog(LOG_ERR, "%s: Incomplete firmware read: %d/%d", __func__, got_bytes, length);
+		applog(LOG_ERR, "%s: Incomplete firmware read: %"PRIu64"/%"PRIu64,
+		       __func__, (uint64_t)got_bytes, (uint64_t)length);
 		goto done;
 	}
 

+ 1 - 1
miner.c

@@ -1713,7 +1713,7 @@ static bool work_decode(struct pool *pool, struct work *work, json_t *val)
 			{
 				ssize_t ae = blkmk_append_coinbase_safe(work->tmpl, &template_nonce, sizeof(template_nonce));
 				if (ae < (ssize_t)sizeof(template_nonce))
-					applog(LOG_WARNING, "Cannot append template-nonce to coinbase on pool %u (%d) - you might be wasting hashing!", work->pool->pool_no, ae);
+					applog(LOG_WARNING, "Cannot append template-nonce to coinbase on pool %u (%"PRId64") - you might be wasting hashing!", work->pool->pool_no, (int64_t)ae);
 			}
 		}
 #endif