Many test fixes (failures due to excessive compiler warnings).
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 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254
diff --git a/libffi/ChangeLog.libffi b/libffi/ChangeLog.libffi
index 5621ca8..bcd59f4 100644
--- a/libffi/ChangeLog.libffi
+++ b/libffi/ChangeLog.libffi
@@ -1,3 +1,14 @@
+2008-07-24 Anthony Green <green@redhat.com>
+
+ * testsuite/libffi.call/cls_dbls_struct.c,
+ testsuite/libffi.call/cls_double_va.c,
+ testsuite/libffi.call/cls_longdouble.c,
+ testsuite/libffi.call/cls_longdouble_va.c,
+ testsuite/libffi.call/cls_pointer.c,
+ testsuite/libffi.call/cls_pointer_stack.c,
+ testsuite/libffi.call/err_bad_abi.c: Clean up failures from
+ compiler warnings.
+
2008-07-17 Anthony Green <green@redhat.com>
* configure.ac: Bump version to 3.0.6.
diff --git a/libffi/doc/libffi.info b/libffi/doc/libffi.info
index dc7f02c..6321aae 100644
--- a/libffi/doc/libffi.info
+++ b/libffi/doc/libffi.info
@@ -1,5 +1,5 @@
-This is ../libffi/doc/libffi.info, produced by makeinfo version 4.11
-from ../libffi/doc/libffi.texi.
+This is doc/libffi.info, produced by makeinfo version 4.11 from
+./doc/libffi.texi.
This manual is for Libffi, a portable foreign-function interface
library.
@@ -516,18 +516,18 @@ Index
Tag Table:
-Node: Top688
-Node: Introduction1424
-Node: Using libffi3060
-Node: The Basics3495
-Node: Simple Example6102
-Node: Types7129
-Node: Primitive Types7412
-Node: Structures9232
-Node: Type Example10092
-Node: Multiple ABIs11315
-Node: The Closure API11686
-Node: Missing Features14606
-Node: Index15099
+Node: Top670
+Node: Introduction1406
+Node: Using libffi3042
+Node: The Basics3477
+Node: Simple Example6084
+Node: Types7111
+Node: Primitive Types7394
+Node: Structures9214
+Node: Type Example10074
+Node: Multiple ABIs11297
+Node: The Closure API11668
+Node: Missing Features14588
+Node: Index15081
End Tag Table
diff --git a/libffi/testsuite/libffi.call/cls_dbls_struct.c b/libffi/testsuite/libffi.call/cls_dbls_struct.c
index 8f572c0..c5d43d7 100644
--- a/libffi/testsuite/libffi.call/cls_dbls_struct.c
+++ b/libffi/testsuite/libffi.call/cls_dbls_struct.c
@@ -20,12 +20,13 @@ closure_test_fn(Dbls p)
}
void
-closure_test_gn(ffi_cif* cif,void* resp,void** args, void* userdata)
+closure_test_gn(ffi_cif* cif __UNUSED__, void* resp __UNUSED__,
+ void** args, void* userdata __UNUSED__)
{
closure_test_fn(*(Dbls*)args[0]);
}
-int main(int argc, char** argv)
+int main(int argc __UNUSED__, char** argv __UNUSED__)
{
ffi_cif cif;
diff --git a/libffi/testsuite/libffi.call/cls_double_va.c b/libffi/testsuite/libffi.call/cls_double_va.c
index f14f86f..4d6d5b7 100644
--- a/libffi/testsuite/libffi.call/cls_double_va.c
+++ b/libffi/testsuite/libffi.call/cls_double_va.c
@@ -8,7 +8,8 @@
#include "ffitest.h"
static void
-cls_double_va_fn(ffi_cif* cif, void* resp, void** args, void* userdata)
+cls_double_va_fn(ffi_cif* cif __UNUSED__, void* resp,
+ void** args, void* userdata __UNUSED__)
{
char* format = *(char**)args[0];
double doubleValue = *(double*)args[1];
@@ -49,14 +50,14 @@ int main (void)
ffi_call(&cif, FFI_FN(printf), &res, args);
// { dg-output "7.0" }
- printf("res: %d\n", res);
+ printf("res: %d\n", (int) res);
// { dg-output "\nres: 4" }
CHECK(ffi_prep_closure(pcl, &cif, cls_double_va_fn, NULL) == FFI_OK);
res = ((int(*)(char*, double))(pcl))(format, doubleArg);
// { dg-output "\n7.0" }
- printf("res: %d\n", res);
+ printf("res: %d\n", (int) res);
// { dg-output "\nres: 4" }
exit(0);
diff --git a/libffi/testsuite/libffi.call/cls_longdouble.c b/libffi/testsuite/libffi.call/cls_longdouble.c
index ae2b608..8d7bd27 100644
--- a/libffi/testsuite/libffi.call/cls_longdouble.c
+++ b/libffi/testsuite/libffi.call/cls_longdouble.c
@@ -28,7 +28,8 @@ long double cls_ldouble_fn(
}
static void
-cls_ldouble_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
+cls_ldouble_gn(ffi_cif* cif __UNUSED__, void* resp,
+ void** args, void* userdata __UNUSED__)
{
long double a1 = *(long double*)args[0];
long double a2 = *(long double*)args[1];
diff --git a/libffi/testsuite/libffi.call/cls_longdouble_va.c b/libffi/testsuite/libffi.call/cls_longdouble_va.c
index 41ee034..92b9e36 100644
--- a/libffi/testsuite/libffi.call/cls_longdouble_va.c
+++ b/libffi/testsuite/libffi.call/cls_longdouble_va.c
@@ -8,7 +8,8 @@
#include "ffitest.h"
static void
-cls_longdouble_va_fn(ffi_cif* cif, void* resp, void** args, void* userdata)
+cls_longdouble_va_fn(ffi_cif* cif __UNUSED__, void* resp,
+ void** args, void* userdata __UNUSED__)
{
char* format = *(char**)args[0];
long double ldValue = *(long double*)args[1];
@@ -49,14 +50,14 @@ int main (void)
ffi_call(&cif, FFI_FN(printf), &res, args);
// { dg-output "7.0" }
- printf("res: %d\n", res);
+ printf("res: %d\n", (int) res);
// { dg-output "\nres: 4" }
CHECK(ffi_prep_closure(pcl, &cif, cls_longdouble_va_fn, NULL) == FFI_OK);
res = ((int(*)(char*, long double))(pcl))(format, ldArg);
// { dg-output "\n7.0" }
- printf("res: %d\n", res);
+ printf("res: %d\n", (int) res);
// { dg-output "\nres: 4" }
exit(0);
diff --git a/libffi/testsuite/libffi.call/cls_pointer.c b/libffi/testsuite/libffi.call/cls_pointer.c
index 6612bbb..993b5ca 100644
--- a/libffi/testsuite/libffi.call/cls_pointer.c
+++ b/libffi/testsuite/libffi.call/cls_pointer.c
@@ -11,13 +11,15 @@ void* cls_pointer_fn(void* a1, void* a2)
{
void* result = (void*)((long)a1 + (long)a2);
- printf("0x%08x 0x%08x: 0x%08x\n", a1, a2, result);
+ printf("0x%08x 0x%08x: 0x%08x\n",
+ (unsigned int) a1, (unsigned int) a2, (unsigned int) result);
return result;
}
static void
-cls_pointer_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
+cls_pointer_gn(ffi_cif* cif __UNUSED__, void* resp,
+ void** args, void* userdata __UNUSED__)
{
void* a1 = *(void**)(args[0]);
void* a2 = *(void**)(args[1]);
@@ -64,14 +66,14 @@ int main (void)
ffi_call(&cif, FFI_FN(cls_pointer_fn), &res, args);
/* { dg-output "0x12345678 0x89abcdef: 0x9be02467" } */
- printf("res: 0x%08x\n", res);
+ printf("res: 0x%08x\n", (unsigned int) res);
/* { dg-output "\nres: 0x9be02467" } */
CHECK(ffi_prep_closure(pcl, &cif, cls_pointer_gn, NULL) == FFI_OK);
res = (ffi_arg)((void*(*)(void*, void*))(pcl))(arg1, arg2);
/* { dg-output "\n0x12345678 0x89abcdef: 0x9be02467" } */
- printf("res: 0x%08x\n", res);
+ printf("res: 0x%08x\n", (unsigned int) res);
/* { dg-output "\nres: 0x9be02467" } */
exit(0);
diff --git a/libffi/testsuite/libffi.call/cls_pointer_stack.c b/libffi/testsuite/libffi.call/cls_pointer_stack.c
index 5e3575a..2c792b9 100644
--- a/libffi/testsuite/libffi.call/cls_pointer_stack.c
+++ b/libffi/testsuite/libffi.call/cls_pointer_stack.c
@@ -34,7 +34,8 @@ void* cls_pointer_fn2(void* a1, void* a2)
void* result = (void*)((long)a1 + (long)a2);
- printf("0x%08x 0x%08x: 0x%08x\n", a1, a2, result);
+ printf("0x%08x 0x%08x: 0x%08x\n",
+ (unsigned int) a1, (unsigned int) a2, (unsigned int) result);
return result;
}
@@ -63,7 +64,8 @@ void* cls_pointer_fn1(void* a1, void* a2)
}
static void
-cls_pointer_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
+cls_pointer_gn(ffi_cif* cif __UNUSED__, void* resp,
+ void** args, void* userdata __UNUSED__)
{
void* a1 = *(void**)(args[0]);
void* a2 = *(void**)(args[1]);
@@ -123,7 +125,7 @@ int main (void)
printf("\n");
ffi_call(&cif, FFI_FN(cls_pointer_fn1), &res, args);
- printf("res: 0x%08x\n", res);
+ printf("res: 0x%08x\n", (unsigned int) res);
// { dg-output "\n0x01234567 0x89abcdef: 0x8acf1356" }
// { dg-output "\n0x8acf1356 0x01234567: 0x8bf258bd" }
// { dg-output "\nres: 0x8bf258bd" }
@@ -132,7 +134,7 @@ int main (void)
res = (ffi_arg)((void*(*)(void*, void*))(pcl))(arg1, arg2);
- printf("res: 0x%08x\n", res);
+ printf("res: 0x%08x\n", (unsigned int) res);
// { dg-output "\n0x01234567 0x89abcdef: 0x8acf1356" }
// { dg-output "\n0x8acf1356 0x01234567: 0x8bf258bd" }
// { dg-output "\nres: 0x8bf258bd" }
diff --git a/libffi/testsuite/libffi.call/err_bad_abi.c b/libffi/testsuite/libffi.call/err_bad_abi.c
index 9e22e33..ca54b69 100644
--- a/libffi/testsuite/libffi.call/err_bad_abi.c
+++ b/libffi/testsuite/libffi.call/err_bad_abi.c
@@ -8,7 +8,8 @@
#include "ffitest.h"
static void
-dummy_fn(ffi_cif* cif, void* resp, void** args, void* userdata)
+dummy_fn(ffi_cif* cif __UNUSED__, void* resp __UNUSED__,
+ void** args __UNUSED__, void* userdata __UNUSED__)
{}
int main (void)