Merge pull request #336 from Kreeblah/warning_fixes

Fixed build warnings
This commit is contained in:
sanni 2022-02-25 08:32:29 +01:00 committed by GitHub
commit 3116321b36
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 2670 additions and 2670 deletions

File diff suppressed because it is too large Load Diff

View File

@ -851,7 +851,7 @@ unsigned char* getNESHeaderForFileInfo(uint32_t prg_size, uint32_t chr_size, uin
} }
char* temp_line; char* temp_line;
char* nes20_header; unsigned char* nes20_header;
int i; int i;
if (!sdFile.open("/nes20db.txt", FILE_READ)) { 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(); display_Update();
} }
temp_line = malloc(256 * sizeof(char)); temp_line = (char*)malloc(256 * sizeof(char));
while (sdFile.available()) { while (sdFile.available()) {
// We're reading fixed-length lines // We're reading fixed-length lines
// padded with null characters // padded with null characters

File diff suppressed because it is too large Load Diff

View File

@ -528,8 +528,8 @@ void writeSRAM_SMS() {
if (myFile.open(filePath, O_READ)) { if (myFile.open(filePath, O_READ)) {
// Get SRAM size from file, with a maximum of 32KB // Get SRAM size from file, with a maximum of 32KB
uint32_t sramSize = myFile.fileSize(); uint32_t sramSize = myFile.fileSize();
if (sramSize > (32 * 1024)) { if (sramSize > ((uint32_t)32 * (uint32_t)1024)) {
sramSize = 32 * 1024; sramSize = (uint32_t)32 * (uint32_t)1024;
} }
print_Msg(F("sramSize: ")); print_Msg(F("sramSize: "));
print_Msg(sramSize); print_Msg(sramSize);

View File

@ -4,7 +4,7 @@
int32_t readClockOffset() { int32_t readClockOffset() {
FsFile clock_file; FsFile clock_file;
unsigned char* clock_buf; char* clock_buf;
int16_t i; int16_t i;
int32_t clock_offset; int32_t clock_offset;
@ -12,7 +12,7 @@ int32_t readClockOffset() {
return INT32_MIN; return INT32_MIN;
} }
clock_buf = malloc(12 * sizeof(char)); clock_buf = (char*)malloc(12 * sizeof(char));
i = clock_file.read(clock_buf, 11); i = clock_file.read(clock_buf, 11);
clock_file.close(); clock_file.close();
if (i == -1) { if (i == -1) {