mirror of
https://github.com/sanni/cartreader.git
synced 2024-11-11 07:25:07 +01:00
Merge pull request #336 from Kreeblah/warning_fixes
Fixed build warnings
This commit is contained in:
commit
3116321b36
3418
Cart_Reader/GB.ino
3418
Cart_Reader/GB.ino
File diff suppressed because it is too large
Load Diff
@ -851,7 +851,7 @@ unsigned char* getNESHeaderForFileInfo(uint32_t prg_size, uint32_t chr_size, uin
|
||||
}
|
||||
|
||||
char* temp_line;
|
||||
char* nes20_header;
|
||||
unsigned char* nes20_header;
|
||||
int i;
|
||||
|
||||
if (!sdFile.open("/nes20db.txt", FILE_READ)) {
|
||||
@ -862,7 +862,7 @@ unsigned char* getNESHeaderForFileInfo(uint32_t prg_size, uint32_t chr_size, uin
|
||||
display_Update();
|
||||
}
|
||||
|
||||
temp_line = malloc(256 * sizeof(char));
|
||||
temp_line = (char*)malloc(256 * sizeof(char));
|
||||
while (sdFile.available()) {
|
||||
// We're reading fixed-length lines
|
||||
// padded with null characters
|
||||
|
1910
Cart_Reader/PCE.ino
1910
Cart_Reader/PCE.ino
File diff suppressed because it is too large
Load Diff
@ -528,8 +528,8 @@ void writeSRAM_SMS() {
|
||||
if (myFile.open(filePath, O_READ)) {
|
||||
// Get SRAM size from file, with a maximum of 32KB
|
||||
uint32_t sramSize = myFile.fileSize();
|
||||
if (sramSize > (32 * 1024)) {
|
||||
sramSize = 32 * 1024;
|
||||
if (sramSize > ((uint32_t)32 * (uint32_t)1024)) {
|
||||
sramSize = (uint32_t)32 * (uint32_t)1024;
|
||||
}
|
||||
print_Msg(F("sramSize: "));
|
||||
print_Msg(sramSize);
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
int32_t readClockOffset() {
|
||||
FsFile clock_file;
|
||||
unsigned char* clock_buf;
|
||||
char* clock_buf;
|
||||
int16_t i;
|
||||
int32_t clock_offset;
|
||||
|
||||
@ -12,7 +12,7 @@ int32_t readClockOffset() {
|
||||
return INT32_MIN;
|
||||
}
|
||||
|
||||
clock_buf = malloc(12 * sizeof(char));
|
||||
clock_buf = (char*)malloc(12 * sizeof(char));
|
||||
i = clock_file.read(clock_buf, 11);
|
||||
clock_file.close();
|
||||
if (i == -1) {
|
||||
|
Loading…
Reference in New Issue
Block a user