remove all comile warning of kernel

This commit is contained in:
Wang_Weigen
2021-04-29 16:15:11 +08:00
parent c4280d9488
commit e424932163
9 changed files with 21 additions and 15 deletions

View File

@@ -160,7 +160,7 @@ struct statfs {
int statfs(const char *path, struct statfs *buf);
#endif
void Userprintf(const char *fmt, ...);
int Userprintf(const char *fmt, ...);
#define printf Userprintf

View File

@@ -21,6 +21,7 @@
#include "user_api.h"
#include <stdarg.h>
#include <stdio.h>
#define stdio 1
#define CONSOLEBUF_SIZE 128
@@ -123,7 +124,7 @@ int statfs(const char *path, struct statfs *buf){
return (int)(KSwitch2(KS_USER_STAT_FS,(uintptr_t)path,(uintptr_t)buf));
}
void Userprintf(const char *fmt, ...)
int Userprintf(const char *fmt, ...)
{
if(stdio != NONE)
{
@@ -140,5 +141,6 @@ void Userprintf(const char *fmt, ...)
write(stdio, logbuf, length);
va_end(args);
}
return 0;
}