Silence sign-compare warnings in flip1.c
This commit is contained in:
parent
81f01939c2
commit
b75e26bf6d
|
@ -374,7 +374,7 @@ int flip1_read_byte(const PROGRAMMER *pgm, const AVRPART *part, const AVRMEM *me
|
|||
if (strcmp(mem->desc, "signature") == 0) {
|
||||
if (flip1_read_sig_bytes(pgm, part, mem) < 0)
|
||||
return -1;
|
||||
if (addr >= mem->size) {
|
||||
if (addr >= (unsigned long) mem->size) {
|
||||
pmsg_error("signature address %lu out of range [0, %d]\n", addr, mem->size-1);
|
||||
return -1;
|
||||
}
|
||||
|
@ -461,7 +461,7 @@ int flip1_paged_write(const PROGRAMMER *pgm, const AVRPART *part, const AVRMEM *
|
|||
result = flip1_write_memory(FLIP1(pgm)->dfu, mem_unit, addr,
|
||||
mem->buf + addr, n_bytes);
|
||||
|
||||
return (result == 0) ? n_bytes : -1;
|
||||
return result == 0? (int) n_bytes: -1;
|
||||
}
|
||||
|
||||
int flip1_read_sig_bytes(const PROGRAMMER *pgm, const AVRPART *part, const AVRMEM *mem) {
|
||||
|
@ -470,7 +470,7 @@ int flip1_read_sig_bytes(const PROGRAMMER *pgm, const AVRPART *part, const AVRME
|
|||
if (FLIP1(pgm)->dfu == NULL)
|
||||
return -1;
|
||||
|
||||
if (mem->size < sizeof(FLIP1(pgm)->part_sig)) {
|
||||
if (mem->size < (int) sizeof(FLIP1(pgm)->part_sig)) {
|
||||
pmsg_error("signature read must be at least %u bytes\n", (unsigned int) sizeof(FLIP1(pgm)->part_sig));
|
||||
return -1;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue