bug-mes
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] test: 16-cast.c fix for riscv64


From: Ekaitz Zarraga
Subject: [PATCH] test: 16-cast.c fix for riscv64
Date: Wed, 18 Oct 2023 13:35:08 +0000

>From 69789c7b6d80c4b4dcf51ed07bed120fb299a60b Mon Sep 17 00:00:00 2001
From: Ekaitz Zarraga <ekaitz@elenq.tech>
Date: Wed, 18 Oct 2023 15:30:34 +0200
Subject: [PATCH] test: 16-cast.c fix for riscv64

RV64 has `unsigned char` for `char`, so it failed to build. In amd64
`char` is `signed char`, so the code wasn't portable. We have to be
explicit about the sign of the `char`.

* lib/test/scaffold/16-cast.c: Add `signed` to `char`.
---
 lib/tests/scaffold/16-cast.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/tests/scaffold/16-cast.c b/lib/tests/scaffold/16-cast.c
index d83d4e8b..5895a2d7 100644
--- a/lib/tests/scaffold/16-cast.c
+++ b/lib/tests/scaffold/16-cast.c
@@ -21,7 +21,7 @@
 int
 main ()
 {
-  char c = -1;
+  signed char c = -1;
   unsigned u = c;
   unsigned t = (unsigned char)c;
   int i = -1;
-- 
2.41.0





reply via email to

[Prev in Thread] Current Thread [Next in Thread]