Fix compiler warning on syscall functions

This commit is contained in:
Alex 2023-05-05 17:32:33 +03:00
parent 39c3d4e2f2
commit 2b44ad7d75
Signed by untrusted user who does not match committer: enderice2
GPG Key ID: EACC3AD603BAB4DD

View File

@ -129,7 +129,7 @@ enum NativeSyscalls
/** @brief Fork the current process
* @fn int Fork()
* This syscall is used to create a new process that is a copy of the current process.
*/
*/
_Fork,
/** @brief Wait for a process or a thread
@ -267,7 +267,7 @@ static inline bool IsSyscallError(long ret)
static inline long syscall0(long syscall)
{
unsigned long ret;
long ret;
__asm__ __volatile__("syscall"
: "=a"(ret)
: "a"(syscall)
@ -277,7 +277,7 @@ static inline long syscall0(long syscall)
static inline long syscall1(long syscall, long arg1)
{
unsigned long ret;
long ret;
__asm__ __volatile__("syscall"
: "=a"(ret)
: "a"(syscall), "D"(arg1)
@ -287,7 +287,7 @@ static inline long syscall1(long syscall, long arg1)
static inline long syscall2(long syscall, long arg1, long arg2)
{
unsigned long ret;
long ret;
__asm__ __volatile__("syscall"
: "=a"(ret)
: "a"(syscall), "D"(arg1), "S"(arg2)
@ -297,7 +297,7 @@ static inline long syscall2(long syscall, long arg1, long arg2)
static inline long syscall3(long syscall, long arg1, long arg2, long arg3)
{
unsigned long ret;
long ret;
__asm__ __volatile__("syscall"
: "=a"(ret)
: "a"(syscall), "D"(arg1), "S"(arg2), "d"(arg3)
@ -307,7 +307,7 @@ static inline long syscall3(long syscall, long arg1, long arg2, long arg3)
static inline long syscall4(long syscall, long arg1, long arg2, long arg3, long arg4)
{
unsigned long ret;
long ret;
register long r10 __asm__("r10") = arg4;
__asm__ __volatile__("syscall"
: "=a"(ret)
@ -318,7 +318,7 @@ static inline long syscall4(long syscall, long arg1, long arg2, long arg3, long
static inline long syscall5(long syscall, long arg1, long arg2, long arg3, long arg4, long arg5)
{
unsigned long ret;
long ret;
register long r10 __asm__("r10") = arg4;
register long r8 __asm__("r8") = arg5;
__asm__ __volatile__("syscall"
@ -330,7 +330,7 @@ static inline long syscall5(long syscall, long arg1, long arg2, long arg3, long
static inline long syscall6(long syscall, long arg1, long arg2, long arg3, long arg4, long arg5, long arg6)
{
unsigned long ret;
long ret;
register long r10 __asm__("r10") = arg4;
register long r8 __asm__("r8") = arg5;
register long r9 __asm__("r9") = arg6;