diff --git a/examples/pgztest/build.sh b/examples/pgztest/build.sh index 6fb15f9..4027943 100755 --- a/examples/pgztest/build.sh +++ b/examples/pgztest/build.sh @@ -33,7 +33,7 @@ PATH=${LLVM}/bin:${PATH} echo "__f256_start = ${START};" > ${SETTINGS} -CLANG="mos-f256k-clang -I${F256}/include -I${F256}/f256lib -O3" +CLANG="mos-f256k-clang -I${F256}/include -I${F256}/f256lib -Wall -O3" ${CLANG} -c ${F256}/f256lib/f256.c ${CLANG} -c ${PROJECT}.c diff --git a/f256lib/file.c b/f256lib/file.c index dc73da0..e2d4583 100644 --- a/f256lib/file.c +++ b/f256lib/file.c @@ -35,7 +35,7 @@ static char _dirStream[MAX_DRIVES]; static bool findName(char *name, int16_t *offset); static int16_t kernelRead(uint8_t fd, void *buf, uint16_t nbytes); static int16_t kernelWrite(uint8_t fd, void *buf, uint16_t nbytes); -static char *pathWithoutDrive(char *path, char *drive); +static char *pathWithoutDrive(char *path, byte *drive); #pragma push_macro("close") @@ -87,7 +87,7 @@ int16_t *fileOpen(char *fname, char *mode) { int16_t ret = 0; uint8_t m = 0; // Default to READ. int16_t *fd; - char drive; + byte drive; char *c; fname = pathWithoutDrive(fname, &drive); @@ -124,7 +124,7 @@ int16_t *fileOpen(char *fname, char *mode) { char *fileOpenDir(char *name) { - char drive; + byte drive; char stream; char *dir; @@ -234,9 +234,8 @@ fileDirEntT *fileReadDir(char *dir) { int16_t fileRename(char *name, char *to) { - char drive; - char drive2; - char stream; + byte drive; + byte drive2; int16_t path1; int16_t path2; @@ -261,7 +260,7 @@ int16_t fileRename(char *name, char *to) { kernelArgs->common.buflen = strlen(name); kernelArgs->common.ext = to; kernelArgs->common.extlen = strlen(to); - stream = kernelCall(File.Rename); + kernelCall(File.Rename); if (kernelError) return -1; for (;;) { @@ -296,14 +295,13 @@ int16_t fileSeek(uint8_t *fd, uint32_t offset, uint8_t whence) { int16_t fileUnlink(char *name) { - char drive; - char stream; + byte drive; name = pathWithoutDrive(name, &drive); kernelArgs->file.delete.drive = drive; kernelArgs->common.buf = name; kernelArgs->common.buflen = strlen(name); - stream = kernelCall(File.Delete); + kernelCall(File.Delete); if (kernelError) return -1; for (;;) { @@ -428,7 +426,7 @@ static int16_t kernelWrite(uint8_t fd, void *buf, uint16_t nbytes) { } -static char *pathWithoutDrive(char *path, char *drive) { +static char *pathWithoutDrive(char *path, byte *drive) { *drive = 0; if (strlen(path) < 2) return path; diff --git a/f256lib/text.c b/f256lib/text.c index 4f788c4..a27a8b3 100644 --- a/f256lib/text.c +++ b/f256lib/text.c @@ -198,7 +198,6 @@ void textPrintUInt(uint32_t value){ void textReset(void) { byte x; - byte y; _fcolor = 15; _bcolor = 0;