From 3b7f0d2c5545a89148ce144541423eefd61dd8fd Mon Sep 17 00:00:00 2001 From: Stefan Rueger Date: Wed, 11 Jan 2023 23:25:13 +0000 Subject: [PATCH] Use portable %lu and cast for size_t --- src/ft245r.c | 2 +- src/jtag3.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ft245r.c b/src/ft245r.c index 8eab7d6f..5068903a 100644 --- a/src/ft245r.c +++ b/src/ft245r.c @@ -276,7 +276,7 @@ static int ft245r_recv(const PROGRAMMER *pgm, unsigned char *buf, size_t len) { ft245r_fill(pgm); #if FT245R_DEBUG - msg_info("%s: discarding %d, consuming %zu bytes\n", __func__, rx.discard, len); + msg_info("%s: discarding %d, consuming %lu bytes\n", __func__, rx.discard, (unsigned long) len); #endif while (rx.discard > 0) { int result = ft245r_rx_buf_fill_and_get(pgm); diff --git a/src/jtag3.c b/src/jtag3.c index 62b95779..470fae75 100644 --- a/src/jtag3.c +++ b/src/jtag3.c @@ -2586,7 +2586,7 @@ static int jtag3_send_tpi(const PROGRAMMER *pgm, unsigned char *data, size_t len cmdbuf[0] = SCOPE_AVR_TPI; if (len > INT_MAX) { - pmsg_error("invalid jtag3_send_tpi() packet length %zu\n", len); + pmsg_error("invalid jtag3_send_tpi() packet length %lu\n", (unsigned long) len); free(cmdbuf); return -1; }