Compiles w/o warnings with gcc

FossilOrigin-Name: 8aeb5208592d4c31a07b3eba10aa247483f9648fbaba38eb844cb02e074f31b9
This commit is contained in:
7u83@mail.ru
2018-03-25 08:35:53 +00:00
parent 847781bf7c
commit f136a0f401
16 changed files with 60 additions and 55 deletions

View File

@ -7,21 +7,21 @@ int lw_put_image_data(uint8_t *dst,FILE *infile)
uint16_t checksum;
int bytes;
if ( feof(infile)){
lw_put_byte(dst+0,1);
lw_set_byte(dst+0,1);
return 1;
}
bytes = fread(dst+3,1,LWAPP_BLOCKSIZE_IMAGE_DATA,infile);
if ( ferror(infile)) {
lw_put_byte(dst+0,5);
lw_set_byte(dst+0,5);
return 1;
}
lw_put_byte(dst,3);
lw_set_byte(dst,3);
checksum = lw_checksum(dst+3,bytes);
lw_put_word(dst+1,checksum);
lw_set_word(dst+1,checksum);
return bytes+3;
}