This is the mail archive of the
libffi-discuss@sourceware.org
mailing list for the libffi project.
[PATCH 3/3] testsuite: libffi.call/return_uc.c: Fixed casting
- From: Nathan Rossi <nathan dot rossi at xilinx dot com>
- To: <libffi-discuss at sourceware dot org>
- Cc: Nathan Rossi <nathan dot rossi at xilinx dot com>
- Date: Mon, 21 Jan 2013 16:08:55 +1000
- Subject: [PATCH 3/3] testsuite: libffi.call/return_uc.c: Fixed casting
- References: <cover.1358744343.git.nathan.rossi@xilinx.com>
Fixed the casting of the return value from the call. Instead
of casting the uchar up, cast the ffi_arg down to uchar. This
avoids any inconsistencies with the value of the ffi_arg.
Signed-off-by: Nathan Rossi <nathan.rossi@xilinx.com>
---
testsuite/libffi.call/return_uc.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/testsuite/libffi.call/return_uc.c b/testsuite/libffi.call/return_uc.c
index 07c45de..6fe5546 100644
--- a/testsuite/libffi.call/return_uc.c
+++ b/testsuite/libffi.call/return_uc.c
@@ -32,7 +32,7 @@ int main (void)
uc < (unsigned char) '\xff'; uc++)
{
ffi_call(&cif, FFI_FN(return_uc), &rint, values);
- CHECK(rint == (signed int) uc);
+ CHECK((unsigned char)rint == uc);
}
exit(0);
}
--
1.7.5.4