Silence sign-compare warnings in usbtiny.c

This commit is contained in:
Stefan Rueger 2023-01-11 17:42:05 +00:00
parent 319ee2db9c
commit 79dd434d20
No known key found for this signature in database
GPG Key ID: B0B4F1FD86B1EC55
1 changed files with 2 additions and 3 deletions

View File

@ -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);
}