ztx correct applog typing
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
diff --git a/driver-ztex.c b/driver-ztex.c
index 3898589..2ab4a4d 100644
--- a/driver-ztex.c
+++ b/driver-ztex.c
@@ -274,13 +274,13 @@ static int64_t ztex_scanhash(struct thr_info *thr, struct work *work,
if (nonce > noncecnt)
noncecnt = nonce;
if (((0xffffffff - nonce) < (nonce - lastnonce[i])) || nonce < lastnonce[i]) {
- applog(LOG_DEBUG, "%s: overflow nonce=%0.8x lastnonce=%0.8x", ztex->repr, nonce, lastnonce[i]);
+ applog(LOG_DEBUG, "%s: overflow nonce=%08x lastnonce=%08x", ztex->repr, nonce, lastnonce[i]);
overflow = true;
} else
lastnonce[i] = nonce;
if (ztex_checkNonce(work, nonce) != (hdata->hash7 + 0x5be0cd19)) {
- applog(LOG_DEBUG, "%s: checkNonce failed for %0.8X", ztex->repr, nonce);
+ applog(LOG_DEBUG, "%s: checkNonce failed for %08X", ztex->repr, nonce);
// do not count errors in the first 500ms after sendHashData (2x250 wait time)
if (count > 2) {
@@ -320,7 +320,7 @@ static int64_t ztex_scanhash(struct thr_info *thr, struct work *work,
work->blk.nonce = 0xffffffff;
submit_nonce(thr, work, nonce);
- applog(LOG_DEBUG, "%s: submitted %0.8x", ztex->repr, nonce);
+ applog(LOG_DEBUG, "%s: submitted %08x", ztex->repr, nonce);
}
}
}
diff --git a/libztex.c b/libztex.c
index b3dfbeb..0cefcf6 100644
--- a/libztex.c
+++ b/libztex.c
@@ -130,7 +130,7 @@ static enum check_result libztex_checkDevice(struct libusb_device *dev)
}
if (desc.idVendor != LIBZTEX_IDVENDOR || desc.idProduct != LIBZTEX_IDPRODUCT) {
- applog(LOG_DEBUG, "Not a ZTEX device %0.4x:%0.4x", desc.idVendor, desc.idProduct);
+ applog(LOG_DEBUG, "Not a ZTEX device %04x:%04x", desc.idVendor, desc.idProduct);
return CHECK_IS_NOT_ZTEX;
}
@@ -238,7 +238,7 @@ 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: %zu/%zu", __func__, got_bytes, length);
goto done;
}
@@ -735,7 +735,7 @@ int libztex_scanDevices(struct libztex_dev_list*** devs_p)
do {
cnt = libusb_get_device_list(NULL, &list);
if (unlikely(cnt < 0)) {
- applog(LOG_ERR, "Ztex scan devices: Failed to list usb devices with err %d", cnt);
+ applog(LOG_ERR, "Ztex scan devices: Failed to list usb devices with err %zd", cnt);
goto done;
}