testsuite/libffi.call: fix mismatching return types (#679) Co-authored-by: Andreas Schwab <schwab@suse.de>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
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)