A modern Music Player Daemon based on Rockbox open source high quality audio player
libadwaita audio rust zig deno mpris rockbox mpd

fwpatcher: fix compile errors and warnings on modern Linux

Change-Id: I87b71654ce8669904cfb587cb0673a46455bcbd1

+6 -6
+1 -1
tools/fwpatcher/Makefile
··· 8 # 9 10 #value for crosscompiling on linux 11 - PREFIX=i586-mingw32msvc- 12 13 #value for compiling on cygwin 14 #PREFIX=
··· 8 # 9 10 #value for crosscompiling on linux 11 + PREFIX=i686-w64-mingw32- 12 13 #value for compiling on cygwin 14 #PREFIX=
+5 -5
tools/fwpatcher/main.c
··· 83 /* First, read the iriver original firmware into the image */ 84 f = _tfopen(infile, TEXT("rb")); 85 if(!f) { 86 - perror(infile); 87 return 0; 88 } 89 90 i = fread(image, 1, 16, f); 91 if(i < 16) { 92 - perror(infile); 93 return 0; 94 } 95 ··· 102 len = binary_length+0x200-16; 103 i = fread(image+16, 1, len, f); 104 if(i < len) { 105 - perror(infile); 106 return 0; 107 } 108 ··· 112 113 f = _tfopen(outfile, TEXT("wb")); 114 if(!f) { 115 - perror(outfile); 116 return 0; 117 } 118 ··· 164 165 i = fwrite(image, 1, total_length, f); 166 if(i < total_length) { 167 - perror(outfile); 168 return 0; 169 } 170
··· 83 /* First, read the iriver original firmware into the image */ 84 f = _tfopen(infile, TEXT("rb")); 85 if(!f) { 86 + _tperror(infile); 87 return 0; 88 } 89 90 i = fread(image, 1, 16, f); 91 if(i < 16) { 92 + _tperror(infile); 93 return 0; 94 } 95 ··· 102 len = binary_length+0x200-16; 103 i = fread(image+16, 1, len, f); 104 if(i < len) { 105 + _tperror(infile); 106 return 0; 107 } 108 ··· 112 113 f = _tfopen(outfile, TEXT("wb")); 114 if(!f) { 115 + _tperror(outfile); 116 return 0; 117 } 118 ··· 164 165 i = fwrite(image, 1, total_length, f); 166 if(i < total_length) { 167 + _tperror(outfile); 168 return 0; 169 } 170