Now builds without warnings.
This commit is contained in:
parent
954c97a590
commit
835cf7b9b1
3 changed files with 10 additions and 13 deletions
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -198,7 +198,6 @@ void textPrintUInt(uint32_t value){
|
|||
|
||||
void textReset(void) {
|
||||
byte x;
|
||||
byte y;
|
||||
|
||||
_fcolor = 15;
|
||||
_bcolor = 0;
|
||||
|
|
Loading…
Add table
Reference in a new issue