Silence sign-compare warnings in flip2.c

This commit is contained in:
Stefan Rueger 2023-01-11 23:38:43 +00:00
parent 3c51fb6aae
commit 2a79faae86
No known key found for this signature in database
GPG Key ID: B0B4F1FD86B1EC55
1 changed files with 3 additions and 3 deletions

View File

@ -459,7 +459,7 @@ int flip2_paged_load(const PROGRAMMER *pgm, const AVRPART *part, const AVRMEM *m
result = flip2_read_memory(FLIP2(pgm)->dfu, mem_unit, addr, result = flip2_read_memory(FLIP2(pgm)->dfu, mem_unit, addr,
mem->buf + addr, n_bytes); mem->buf + addr, n_bytes);
return (result == 0) ? n_bytes : -1; return result == 0? (int) n_bytes: -1;
} }
int flip2_paged_write(const PROGRAMMER *pgm, const AVRPART *part, const AVRMEM *mem, int flip2_paged_write(const PROGRAMMER *pgm, const AVRPART *part, const AVRMEM *mem,
@ -490,7 +490,7 @@ int flip2_paged_write(const PROGRAMMER *pgm, const AVRPART *part, const AVRMEM *
result = flip2_write_memory(FLIP2(pgm)->dfu, mem_unit, addr, result = flip2_write_memory(FLIP2(pgm)->dfu, mem_unit, addr,
mem->buf + addr, n_bytes); mem->buf + addr, n_bytes);
return (result == 0) ? n_bytes : -1; return result == 0? (int) n_bytes: -1;
} }
// Parse the -E option flag // Parse the -E option flag
@ -520,7 +520,7 @@ int flip2_read_sig_bytes(const PROGRAMMER *pgm, const AVRPART *part, const AVRME
if (FLIP2(pgm)->dfu == NULL) if (FLIP2(pgm)->dfu == NULL)
return -1; return -1;
if (mem->size < sizeof(FLIP2(pgm)->part_sig)) { if (mem->size < (int) sizeof(FLIP2(pgm)->part_sig)) {
pmsg_error("signature read must be at least %u bytes\n", (unsigned int) sizeof(FLIP2(pgm)->part_sig)); pmsg_error("signature read must be at least %u bytes\n", (unsigned int) sizeof(FLIP2(pgm)->part_sig));
return -1; return -1;
} }