From: Gerhard Sittig Date: Thu, 16 Mar 2023 02:29:54 +0000 (+0100) Subject: rdtech-tc: use size_t for memory sizes and indices X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=63f46e3e6f1b3b0a20a1da45ad10a1cd0a8937ab;p=libsigrok.git rdtech-tc: use size_t for memory sizes and indices --- diff --git a/src/hardware/rdtech-tc/protocol.c b/src/hardware/rdtech-tc/protocol.c index f4e02a67..39d52ba5 100644 --- a/src/hardware/rdtech-tc/protocol.c +++ b/src/hardware/rdtech-tc/protocol.c @@ -178,13 +178,13 @@ static void handle_poll_data(const struct sr_dev_inst *sdi) { struct dev_context *devc; uint8_t poll_pkt[TC_POLL_LEN]; - int i; + size_t i; GSList *ch; devc = sdi->priv; - sr_spew("Received poll packet (len: %d).", devc->buflen); + sr_spew("Received poll packet (len: %zu).", devc->buflen); if (devc->buflen != TC_POLL_LEN) { - sr_err("Unexpected poll packet length: %i", devc->buflen); + sr_err("Unexpected poll packet length: %zu", devc->buflen); return; } diff --git a/src/hardware/rdtech-tc/protocol.h b/src/hardware/rdtech-tc/protocol.h index 9c7056d0..4692ec40 100644 --- a/src/hardware/rdtech-tc/protocol.h +++ b/src/hardware/rdtech-tc/protocol.h @@ -38,7 +38,7 @@ struct dev_context { const struct binary_analog_channel *channels; struct sr_sw_limits limits; uint8_t buf[RDTECH_TC_BUFSIZE]; - int buflen; + size_t buflen; int64_t cmd_sent_at; };