From 79dd434d2055ae12a4ccc9c3928140ac806c7042 Mon Sep 17 00:00:00 2001 From: Stefan Rueger Date: Wed, 11 Jan 2023 17:42:05 +0000 Subject: [PATCH] Silence sign-compare warnings in usbtiny.c --- src/usbtiny.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/usbtiny.c b/src/usbtiny.c index a69de8f3..5090f538 100644 --- a/src/usbtiny.c +++ b/src/usbtiny.c @@ -735,7 +735,7 @@ static int usbtiny_paged_write(const PROGRAMMER *pgm, const AVRPART *p, const AV } // we can only write a page at a time anyways - if (m->paged && chunk > page_size) + if (m->paged && chunk > (int) page_size) chunk = page_size; if (usb_out(pgm, @@ -752,8 +752,7 @@ static int usbtiny_paged_write(const PROGRAMMER *pgm, const AVRPART *p, const AV } next = addr + chunk; // Calculate what address we're at now - if (m->paged - && ((next % page_size) == 0 || next == maxaddr) ) { + if (m->paged && (next % page_size == 0 || next == (int) maxaddr) ) { // If we're at a page boundary, send the SPI command to flush it. avr_write_page(pgm, p, m, (unsigned long) addr); }