Commit 4fa6239f42ddc7df12e40da9ae25ba715312239c

Andreas Schwab 2021-12-23T14:27:32

testsuite/libffi.call: fix mismatching return types (#679) Co-authored-by: Andreas Schwab <schwab@suse.de>

diff --git a/testsuite/libffi.call/strlen.c b/testsuite/libffi.call/strlen.c
index 35b70ea..ce0cd66 100644
--- a/testsuite/libffi.call/strlen.c
+++ b/testsuite/libffi.call/strlen.c
@@ -7,7 +7,7 @@
 /* { dg-do run } */
 #include "ffitest.h"
 
-static size_t ABI_ATTR my_strlen(char *s)
+static int ABI_ATTR my_strlen(char *s)
 {
   return (strlen(s));
 }
diff --git a/testsuite/libffi.call/strlen2.c b/testsuite/libffi.call/strlen2.c
index 96282bc..93e5a33 100644
--- a/testsuite/libffi.call/strlen2.c
+++ b/testsuite/libffi.call/strlen2.c
@@ -8,9 +8,9 @@
 
 #include "ffitest.h"
 
-static size_t ABI_ATTR my_f(char *s, float a)
+static int ABI_ATTR my_f(char *s, float a)
 {
-  return (size_t) ((int) strlen(s) + (int) a);
+  return (int) strlen(s) + (int) a;
 }
 
 int main (void)
diff --git a/testsuite/libffi.call/strlen3.c b/testsuite/libffi.call/strlen3.c
index beba86e..c7d472d 100644
--- a/testsuite/libffi.call/strlen3.c
+++ b/testsuite/libffi.call/strlen3.c
@@ -8,9 +8,9 @@
 
 #include "ffitest.h"
 
-static size_t ABI_ATTR my_f(float a, char *s)
+static int ABI_ATTR my_f(float a, char *s)
 {
-  return (size_t) ((int) strlen(s) + (int) a);
+  return (int) strlen(s) + (int) a;
 }
 
 int main (void)
diff --git a/testsuite/libffi.call/strlen4.c b/testsuite/libffi.call/strlen4.c
index d5d42b4..ba5c274 100644
--- a/testsuite/libffi.call/strlen4.c
+++ b/testsuite/libffi.call/strlen4.c
@@ -8,9 +8,9 @@
 
 #include "ffitest.h"
 
-static size_t ABI_ATTR my_f(float a, char *s, int i)
+static int ABI_ATTR my_f(float a, char *s, int i)
 {
-  return (size_t) ((int) strlen(s) + (int) a + i);
+  return (int) strlen(s) + (int) a + i;
 }
 
 int main (void)