@@ -90,7 +90,7 @@ struct ROM_File_Descriptor {
90
90
#endif
91
91
92
92
int sim_read_ROM_include (const char * include_filename ,
93
- int * psize ,
93
+ size_t * psize ,
94
94
unsigned char * * pROMData ,
95
95
unsigned int * pchecksum ,
96
96
char * * prom_array_name ,
@@ -227,7 +227,7 @@ return 1;
227
227
}
228
228
229
229
int sim_make_ROM_include (const char * rom_filename ,
230
- int expected_size ,
230
+ size_t expected_size ,
231
231
unsigned int expected_checksum ,
232
232
const char * include_filename ,
233
233
const char * rom_array_name ,
@@ -237,7 +237,7 @@ FILE *rFile;
237
237
FILE * iFile ;
238
238
time_t now ;
239
239
int bytes_written = 0 ;
240
- int include_bytes ;
240
+ size_t include_bytes ;
241
241
int c ;
242
242
int rom ;
243
243
struct stat statb ;
@@ -275,8 +275,8 @@ if (stat (rom_filename, &statb)) {
275
275
fclose (rFile );
276
276
return -1 ;
277
277
}
278
- if (statb .st_size != expected_size ) {
279
- printf ("Error: ROM file '%s' has an unexpected size: %d vs %d\n" , rom_filename , (int )statb .st_size , expected_size );
278
+ if (( size_t ) statb .st_size != ( size_t ) expected_size ) {
279
+ printf ("Error: ROM file '%s' has an unexpected size: %d vs %d\n" , rom_filename , (int )statb .st_size , ( int ) expected_size );
280
280
printf ("This can happen if the file was transferred or unpacked incorrectly\n" );
281
281
printf ("and in the process tried to convert line endings rather than passing\n" );
282
282
printf ("the file's contents unmodified\n" );
0 commit comments