Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKito Cheng <kito.cheng@sifive.com>2023-12-04 10:41:28 +0300
committerCorinna Vinschen <corinna@vinschen.de>2023-12-04 12:26:41 +0300
commitbcd1883560b79b67f06fa1df6dea60d18fdd00c7 (patch)
treea3b5f6e81cf229b1450587bb587f4f280782a71f /libgloss/riscv
parentc0d2f3874207e870ffb8a181b0a49637d77e5fdc (diff)
RISC-V: Fix -Wint-conversion warning
Upstream GCC has change this warning into error by default, so...we need to explicitly convert the type from pointer from/to integer, generally it's unsafe, but we know what we are doing here. However it's not safe for ilp32 on RV64, but we didn't support that yet, so I think this fix is good enough now :)
Diffstat (limited to 'libgloss/riscv')
-rw-r--r--libgloss/riscv/internal_syscall.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/libgloss/riscv/internal_syscall.h b/libgloss/riscv/internal_syscall.h
index 1f1f42f5d..080c8c847 100644
--- a/libgloss/riscv/internal_syscall.h
+++ b/libgloss/riscv/internal_syscall.h
@@ -63,7 +63,7 @@ __internal_syscall(long n, int argc, long _a0, long _a1, long _a2, long _a3, lon
}
static inline long
-syscall_errno(long n, int argc, long _a0, long _a1, long _a2, long _a3, long _a4, long _a5)
+_syscall_errno(long n, int argc, long _a0, long _a1, long _a2, long _a3, long _a4, long _a5)
{
long a0 = __internal_syscall (n, argc, _a0, _a1, _a2, _a3, _a4, _a5);
@@ -73,4 +73,8 @@ syscall_errno(long n, int argc, long _a0, long _a1, long _a2, long _a3, long _a4
return a0;
}
+#define syscall_errno(N, ARGC, A0, A1, A2, A3, A4, A5) \
+ _syscall_errno(N, ARGC, (long)A0, (long)A1, (long)A2, \
+ (long)A3, (long)A4, (long)A5)
+
#endif