Commit b8fc783b authored by Mike McCormack's avatar Mike McCormack Committed by Alexandre Julliard

Avoid warnings in generated tests by casting sizeof(x) to an int.

parent 4aa1607a
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
# define TEST_FIELD_ALIGNMENT(type, field, align) \ # define TEST_FIELD_ALIGNMENT(type, field, align) \
ok(FIELD_ALIGNMENT(type, field) == align, \ ok(FIELD_ALIGNMENT(type, field) == align, \
"FIELD_ALIGNMENT(" #type ", " #field ") == %d (expected " #align ")\n", \ "FIELD_ALIGNMENT(" #type ", " #field ") == %d (expected " #align ")\n", \
FIELD_ALIGNMENT(type, field)) (int)FIELD_ALIGNMENT(type, field))
#else #else
# define TEST_FIELD_ALIGNMENT(type, field, align) do { } while (0) # define TEST_FIELD_ALIGNMENT(type, field, align) do { } while (0)
#endif #endif
...@@ -71,24 +71,24 @@ ...@@ -71,24 +71,24 @@
#define TEST_FIELD_OFFSET(type, field, offset) \ #define TEST_FIELD_OFFSET(type, field, offset) \
ok(FIELD_OFFSET(type, field) == offset, \ ok(FIELD_OFFSET(type, field) == offset, \
"FIELD_OFFSET(" #type ", " #field ") == %ld (expected " #offset ")\n", \ "FIELD_OFFSET(" #type ", " #field ") == %ld (expected " #offset ")\n", \
FIELD_OFFSET(type, field)) (long int)FIELD_OFFSET(type, field))
#ifdef _TYPE_ALIGNMENT #ifdef _TYPE_ALIGNMENT
#define TEST__TYPE_ALIGNMENT(type, align) \ #define TEST__TYPE_ALIGNMENT(type, align) \
ok(_TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", _TYPE_ALIGNMENT(type)) ok(_TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", (int)_TYPE_ALIGNMENT(type))
#else #else
# define TEST__TYPE_ALIGNMENT(type, align) do { } while (0) # define TEST__TYPE_ALIGNMENT(type, align) do { } while (0)
#endif #endif
#ifdef TYPE_ALIGNMENT #ifdef TYPE_ALIGNMENT
#define TEST_TYPE_ALIGNMENT(type, align) \ #define TEST_TYPE_ALIGNMENT(type, align) \
ok(TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", TYPE_ALIGNMENT(type)) ok(TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", (int)TYPE_ALIGNMENT(type))
#else #else
# define TEST_TYPE_ALIGNMENT(type, align) do { } while (0) # define TEST_TYPE_ALIGNMENT(type, align) do { } while (0)
#endif #endif
#define TEST_TYPE_SIZE(type, size) \ #define TEST_TYPE_SIZE(type, size) \
ok(sizeof(type) == size, "sizeof(" #type ") == %d (expected " #size ")\n", sizeof(type)) ok(sizeof(type) == size, "sizeof(" #type ") == %d (expected " #size ")\n", ((int) sizeof(type)))
/*********************************************************************** /***********************************************************************
* Test macros * Test macros
......
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
# define TEST_FIELD_ALIGNMENT(type, field, align) \ # define TEST_FIELD_ALIGNMENT(type, field, align) \
ok(FIELD_ALIGNMENT(type, field) == align, \ ok(FIELD_ALIGNMENT(type, field) == align, \
"FIELD_ALIGNMENT(" #type ", " #field ") == %d (expected " #align ")\n", \ "FIELD_ALIGNMENT(" #type ", " #field ") == %d (expected " #align ")\n", \
FIELD_ALIGNMENT(type, field)) (int)FIELD_ALIGNMENT(type, field))
#else #else
# define TEST_FIELD_ALIGNMENT(type, field, align) do { } while (0) # define TEST_FIELD_ALIGNMENT(type, field, align) do { } while (0)
#endif #endif
...@@ -71,24 +71,24 @@ ...@@ -71,24 +71,24 @@
#define TEST_FIELD_OFFSET(type, field, offset) \ #define TEST_FIELD_OFFSET(type, field, offset) \
ok(FIELD_OFFSET(type, field) == offset, \ ok(FIELD_OFFSET(type, field) == offset, \
"FIELD_OFFSET(" #type ", " #field ") == %ld (expected " #offset ")\n", \ "FIELD_OFFSET(" #type ", " #field ") == %ld (expected " #offset ")\n", \
FIELD_OFFSET(type, field)) (long int)FIELD_OFFSET(type, field))
#ifdef _TYPE_ALIGNMENT #ifdef _TYPE_ALIGNMENT
#define TEST__TYPE_ALIGNMENT(type, align) \ #define TEST__TYPE_ALIGNMENT(type, align) \
ok(_TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", _TYPE_ALIGNMENT(type)) ok(_TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", (int)_TYPE_ALIGNMENT(type))
#else #else
# define TEST__TYPE_ALIGNMENT(type, align) do { } while (0) # define TEST__TYPE_ALIGNMENT(type, align) do { } while (0)
#endif #endif
#ifdef TYPE_ALIGNMENT #ifdef TYPE_ALIGNMENT
#define TEST_TYPE_ALIGNMENT(type, align) \ #define TEST_TYPE_ALIGNMENT(type, align) \
ok(TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", TYPE_ALIGNMENT(type)) ok(TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", (int)TYPE_ALIGNMENT(type))
#else #else
# define TEST_TYPE_ALIGNMENT(type, align) do { } while (0) # define TEST_TYPE_ALIGNMENT(type, align) do { } while (0)
#endif #endif
#define TEST_TYPE_SIZE(type, size) \ #define TEST_TYPE_SIZE(type, size) \
ok(sizeof(type) == size, "sizeof(" #type ") == %d (expected " #size ")\n", sizeof(type)) ok(sizeof(type) == size, "sizeof(" #type ") == %d (expected " #size ")\n", ((int) sizeof(type)))
/*********************************************************************** /***********************************************************************
* Test macros * Test macros
......
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
# define TEST_FIELD_ALIGNMENT(type, field, align) \ # define TEST_FIELD_ALIGNMENT(type, field, align) \
ok(FIELD_ALIGNMENT(type, field) == align, \ ok(FIELD_ALIGNMENT(type, field) == align, \
"FIELD_ALIGNMENT(" #type ", " #field ") == %d (expected " #align ")\n", \ "FIELD_ALIGNMENT(" #type ", " #field ") == %d (expected " #align ")\n", \
FIELD_ALIGNMENT(type, field)) (int)FIELD_ALIGNMENT(type, field))
#else #else
# define TEST_FIELD_ALIGNMENT(type, field, align) do { } while (0) # define TEST_FIELD_ALIGNMENT(type, field, align) do { } while (0)
#endif #endif
...@@ -71,24 +71,24 @@ ...@@ -71,24 +71,24 @@
#define TEST_FIELD_OFFSET(type, field, offset) \ #define TEST_FIELD_OFFSET(type, field, offset) \
ok(FIELD_OFFSET(type, field) == offset, \ ok(FIELD_OFFSET(type, field) == offset, \
"FIELD_OFFSET(" #type ", " #field ") == %ld (expected " #offset ")\n", \ "FIELD_OFFSET(" #type ", " #field ") == %ld (expected " #offset ")\n", \
FIELD_OFFSET(type, field)) (long int)FIELD_OFFSET(type, field))
#ifdef _TYPE_ALIGNMENT #ifdef _TYPE_ALIGNMENT
#define TEST__TYPE_ALIGNMENT(type, align) \ #define TEST__TYPE_ALIGNMENT(type, align) \
ok(_TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", _TYPE_ALIGNMENT(type)) ok(_TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", (int)_TYPE_ALIGNMENT(type))
#else #else
# define TEST__TYPE_ALIGNMENT(type, align) do { } while (0) # define TEST__TYPE_ALIGNMENT(type, align) do { } while (0)
#endif #endif
#ifdef TYPE_ALIGNMENT #ifdef TYPE_ALIGNMENT
#define TEST_TYPE_ALIGNMENT(type, align) \ #define TEST_TYPE_ALIGNMENT(type, align) \
ok(TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", TYPE_ALIGNMENT(type)) ok(TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", (int)TYPE_ALIGNMENT(type))
#else #else
# define TEST_TYPE_ALIGNMENT(type, align) do { } while (0) # define TEST_TYPE_ALIGNMENT(type, align) do { } while (0)
#endif #endif
#define TEST_TYPE_SIZE(type, size) \ #define TEST_TYPE_SIZE(type, size) \
ok(sizeof(type) == size, "sizeof(" #type ") == %d (expected " #size ")\n", sizeof(type)) ok(sizeof(type) == size, "sizeof(" #type ") == %d (expected " #size ")\n", ((int) sizeof(type)))
/*********************************************************************** /***********************************************************************
* Test macros * Test macros
......
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
# define TEST_FIELD_ALIGNMENT(type, field, align) \ # define TEST_FIELD_ALIGNMENT(type, field, align) \
ok(FIELD_ALIGNMENT(type, field) == align, \ ok(FIELD_ALIGNMENT(type, field) == align, \
"FIELD_ALIGNMENT(" #type ", " #field ") == %d (expected " #align ")\n", \ "FIELD_ALIGNMENT(" #type ", " #field ") == %d (expected " #align ")\n", \
FIELD_ALIGNMENT(type, field)) (int)FIELD_ALIGNMENT(type, field))
#else #else
# define TEST_FIELD_ALIGNMENT(type, field, align) do { } while (0) # define TEST_FIELD_ALIGNMENT(type, field, align) do { } while (0)
#endif #endif
...@@ -76,24 +76,24 @@ ...@@ -76,24 +76,24 @@
#define TEST_FIELD_OFFSET(type, field, offset) \ #define TEST_FIELD_OFFSET(type, field, offset) \
ok(FIELD_OFFSET(type, field) == offset, \ ok(FIELD_OFFSET(type, field) == offset, \
"FIELD_OFFSET(" #type ", " #field ") == %ld (expected " #offset ")\n", \ "FIELD_OFFSET(" #type ", " #field ") == %ld (expected " #offset ")\n", \
FIELD_OFFSET(type, field)) (long int)FIELD_OFFSET(type, field))
#ifdef _TYPE_ALIGNMENT #ifdef _TYPE_ALIGNMENT
#define TEST__TYPE_ALIGNMENT(type, align) \ #define TEST__TYPE_ALIGNMENT(type, align) \
ok(_TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", _TYPE_ALIGNMENT(type)) ok(_TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", (int)_TYPE_ALIGNMENT(type))
#else #else
# define TEST__TYPE_ALIGNMENT(type, align) do { } while (0) # define TEST__TYPE_ALIGNMENT(type, align) do { } while (0)
#endif #endif
#ifdef TYPE_ALIGNMENT #ifdef TYPE_ALIGNMENT
#define TEST_TYPE_ALIGNMENT(type, align) \ #define TEST_TYPE_ALIGNMENT(type, align) \
ok(TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", TYPE_ALIGNMENT(type)) ok(TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", (int)TYPE_ALIGNMENT(type))
#else #else
# define TEST_TYPE_ALIGNMENT(type, align) do { } while (0) # define TEST_TYPE_ALIGNMENT(type, align) do { } while (0)
#endif #endif
#define TEST_TYPE_SIZE(type, size) \ #define TEST_TYPE_SIZE(type, size) \
ok(sizeof(type) == size, "sizeof(" #type ") == %d (expected " #size ")\n", sizeof(type)) ok(sizeof(type) == size, "sizeof(" #type ") == %d (expected " #size ")\n", ((int) sizeof(type)))
/*********************************************************************** /***********************************************************************
* Test macros * Test macros
......
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
# define TEST_FIELD_ALIGNMENT(type, field, align) \ # define TEST_FIELD_ALIGNMENT(type, field, align) \
ok(FIELD_ALIGNMENT(type, field) == align, \ ok(FIELD_ALIGNMENT(type, field) == align, \
"FIELD_ALIGNMENT(" #type ", " #field ") == %d (expected " #align ")\n", \ "FIELD_ALIGNMENT(" #type ", " #field ") == %d (expected " #align ")\n", \
FIELD_ALIGNMENT(type, field)) (int)FIELD_ALIGNMENT(type, field))
#else #else
# define TEST_FIELD_ALIGNMENT(type, field, align) do { } while (0) # define TEST_FIELD_ALIGNMENT(type, field, align) do { } while (0)
#endif #endif
...@@ -78,24 +78,24 @@ ...@@ -78,24 +78,24 @@
#define TEST_FIELD_OFFSET(type, field, offset) \ #define TEST_FIELD_OFFSET(type, field, offset) \
ok(FIELD_OFFSET(type, field) == offset, \ ok(FIELD_OFFSET(type, field) == offset, \
"FIELD_OFFSET(" #type ", " #field ") == %ld (expected " #offset ")\n", \ "FIELD_OFFSET(" #type ", " #field ") == %ld (expected " #offset ")\n", \
FIELD_OFFSET(type, field)) (long int)FIELD_OFFSET(type, field))
#ifdef _TYPE_ALIGNMENT #ifdef _TYPE_ALIGNMENT
#define TEST__TYPE_ALIGNMENT(type, align) \ #define TEST__TYPE_ALIGNMENT(type, align) \
ok(_TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", _TYPE_ALIGNMENT(type)) ok(_TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", (int)_TYPE_ALIGNMENT(type))
#else #else
# define TEST__TYPE_ALIGNMENT(type, align) do { } while (0) # define TEST__TYPE_ALIGNMENT(type, align) do { } while (0)
#endif #endif
#ifdef TYPE_ALIGNMENT #ifdef TYPE_ALIGNMENT
#define TEST_TYPE_ALIGNMENT(type, align) \ #define TEST_TYPE_ALIGNMENT(type, align) \
ok(TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", TYPE_ALIGNMENT(type)) ok(TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", (int)TYPE_ALIGNMENT(type))
#else #else
# define TEST_TYPE_ALIGNMENT(type, align) do { } while (0) # define TEST_TYPE_ALIGNMENT(type, align) do { } while (0)
#endif #endif
#define TEST_TYPE_SIZE(type, size) \ #define TEST_TYPE_SIZE(type, size) \
ok(sizeof(type) == size, "sizeof(" #type ") == %d (expected " #size ")\n", sizeof(type)) ok(sizeof(type) == size, "sizeof(" #type ") == %d (expected " #size ")\n", ((int) sizeof(type)))
/*********************************************************************** /***********************************************************************
* Test macros * Test macros
......
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
# define TEST_FIELD_ALIGNMENT(type, field, align) \ # define TEST_FIELD_ALIGNMENT(type, field, align) \
ok(FIELD_ALIGNMENT(type, field) == align, \ ok(FIELD_ALIGNMENT(type, field) == align, \
"FIELD_ALIGNMENT(" #type ", " #field ") == %d (expected " #align ")\n", \ "FIELD_ALIGNMENT(" #type ", " #field ") == %d (expected " #align ")\n", \
FIELD_ALIGNMENT(type, field)) (int)FIELD_ALIGNMENT(type, field))
#else #else
# define TEST_FIELD_ALIGNMENT(type, field, align) do { } while (0) # define TEST_FIELD_ALIGNMENT(type, field, align) do { } while (0)
#endif #endif
...@@ -76,24 +76,24 @@ ...@@ -76,24 +76,24 @@
#define TEST_FIELD_OFFSET(type, field, offset) \ #define TEST_FIELD_OFFSET(type, field, offset) \
ok(FIELD_OFFSET(type, field) == offset, \ ok(FIELD_OFFSET(type, field) == offset, \
"FIELD_OFFSET(" #type ", " #field ") == %ld (expected " #offset ")\n", \ "FIELD_OFFSET(" #type ", " #field ") == %ld (expected " #offset ")\n", \
FIELD_OFFSET(type, field)) (long int)FIELD_OFFSET(type, field))
#ifdef _TYPE_ALIGNMENT #ifdef _TYPE_ALIGNMENT
#define TEST__TYPE_ALIGNMENT(type, align) \ #define TEST__TYPE_ALIGNMENT(type, align) \
ok(_TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", _TYPE_ALIGNMENT(type)) ok(_TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", (int)_TYPE_ALIGNMENT(type))
#else #else
# define TEST__TYPE_ALIGNMENT(type, align) do { } while (0) # define TEST__TYPE_ALIGNMENT(type, align) do { } while (0)
#endif #endif
#ifdef TYPE_ALIGNMENT #ifdef TYPE_ALIGNMENT
#define TEST_TYPE_ALIGNMENT(type, align) \ #define TEST_TYPE_ALIGNMENT(type, align) \
ok(TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", TYPE_ALIGNMENT(type)) ok(TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", (int)TYPE_ALIGNMENT(type))
#else #else
# define TEST_TYPE_ALIGNMENT(type, align) do { } while (0) # define TEST_TYPE_ALIGNMENT(type, align) do { } while (0)
#endif #endif
#define TEST_TYPE_SIZE(type, size) \ #define TEST_TYPE_SIZE(type, size) \
ok(sizeof(type) == size, "sizeof(" #type ") == %d (expected " #size ")\n", sizeof(type)) ok(sizeof(type) == size, "sizeof(" #type ") == %d (expected " #size ")\n", ((int) sizeof(type)))
/*********************************************************************** /***********************************************************************
* Test macros * Test macros
......
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
# define TEST_FIELD_ALIGNMENT(type, field, align) \ # define TEST_FIELD_ALIGNMENT(type, field, align) \
ok(FIELD_ALIGNMENT(type, field) == align, \ ok(FIELD_ALIGNMENT(type, field) == align, \
"FIELD_ALIGNMENT(" #type ", " #field ") == %d (expected " #align ")\n", \ "FIELD_ALIGNMENT(" #type ", " #field ") == %d (expected " #align ")\n", \
FIELD_ALIGNMENT(type, field)) (int)FIELD_ALIGNMENT(type, field))
#else #else
# define TEST_FIELD_ALIGNMENT(type, field, align) do { } while (0) # define TEST_FIELD_ALIGNMENT(type, field, align) do { } while (0)
#endif #endif
...@@ -74,24 +74,24 @@ ...@@ -74,24 +74,24 @@
#define TEST_FIELD_OFFSET(type, field, offset) \ #define TEST_FIELD_OFFSET(type, field, offset) \
ok(FIELD_OFFSET(type, field) == offset, \ ok(FIELD_OFFSET(type, field) == offset, \
"FIELD_OFFSET(" #type ", " #field ") == %ld (expected " #offset ")\n", \ "FIELD_OFFSET(" #type ", " #field ") == %ld (expected " #offset ")\n", \
FIELD_OFFSET(type, field)) (long int)FIELD_OFFSET(type, field))
#ifdef _TYPE_ALIGNMENT #ifdef _TYPE_ALIGNMENT
#define TEST__TYPE_ALIGNMENT(type, align) \ #define TEST__TYPE_ALIGNMENT(type, align) \
ok(_TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", _TYPE_ALIGNMENT(type)) ok(_TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", (int)_TYPE_ALIGNMENT(type))
#else #else
# define TEST__TYPE_ALIGNMENT(type, align) do { } while (0) # define TEST__TYPE_ALIGNMENT(type, align) do { } while (0)
#endif #endif
#ifdef TYPE_ALIGNMENT #ifdef TYPE_ALIGNMENT
#define TEST_TYPE_ALIGNMENT(type, align) \ #define TEST_TYPE_ALIGNMENT(type, align) \
ok(TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", TYPE_ALIGNMENT(type)) ok(TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", (int)TYPE_ALIGNMENT(type))
#else #else
# define TEST_TYPE_ALIGNMENT(type, align) do { } while (0) # define TEST_TYPE_ALIGNMENT(type, align) do { } while (0)
#endif #endif
#define TEST_TYPE_SIZE(type, size) \ #define TEST_TYPE_SIZE(type, size) \
ok(sizeof(type) == size, "sizeof(" #type ") == %d (expected " #size ")\n", sizeof(type)) ok(sizeof(type) == size, "sizeof(" #type ") == %d (expected " #size ")\n", ((int) sizeof(type)))
/*********************************************************************** /***********************************************************************
* Test macros * Test macros
......
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
# define TEST_FIELD_ALIGNMENT(type, field, align) \ # define TEST_FIELD_ALIGNMENT(type, field, align) \
ok(FIELD_ALIGNMENT(type, field) == align, \ ok(FIELD_ALIGNMENT(type, field) == align, \
"FIELD_ALIGNMENT(" #type ", " #field ") == %d (expected " #align ")\n", \ "FIELD_ALIGNMENT(" #type ", " #field ") == %d (expected " #align ")\n", \
FIELD_ALIGNMENT(type, field)) (int)FIELD_ALIGNMENT(type, field))
#else #else
# define TEST_FIELD_ALIGNMENT(type, field, align) do { } while (0) # define TEST_FIELD_ALIGNMENT(type, field, align) do { } while (0)
#endif #endif
...@@ -71,24 +71,24 @@ ...@@ -71,24 +71,24 @@
#define TEST_FIELD_OFFSET(type, field, offset) \ #define TEST_FIELD_OFFSET(type, field, offset) \
ok(FIELD_OFFSET(type, field) == offset, \ ok(FIELD_OFFSET(type, field) == offset, \
"FIELD_OFFSET(" #type ", " #field ") == %ld (expected " #offset ")\n", \ "FIELD_OFFSET(" #type ", " #field ") == %ld (expected " #offset ")\n", \
FIELD_OFFSET(type, field)) (long int)FIELD_OFFSET(type, field))
#ifdef _TYPE_ALIGNMENT #ifdef _TYPE_ALIGNMENT
#define TEST__TYPE_ALIGNMENT(type, align) \ #define TEST__TYPE_ALIGNMENT(type, align) \
ok(_TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", _TYPE_ALIGNMENT(type)) ok(_TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", (int)_TYPE_ALIGNMENT(type))
#else #else
# define TEST__TYPE_ALIGNMENT(type, align) do { } while (0) # define TEST__TYPE_ALIGNMENT(type, align) do { } while (0)
#endif #endif
#ifdef TYPE_ALIGNMENT #ifdef TYPE_ALIGNMENT
#define TEST_TYPE_ALIGNMENT(type, align) \ #define TEST_TYPE_ALIGNMENT(type, align) \
ok(TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", TYPE_ALIGNMENT(type)) ok(TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", (int)TYPE_ALIGNMENT(type))
#else #else
# define TEST_TYPE_ALIGNMENT(type, align) do { } while (0) # define TEST_TYPE_ALIGNMENT(type, align) do { } while (0)
#endif #endif
#define TEST_TYPE_SIZE(type, size) \ #define TEST_TYPE_SIZE(type, size) \
ok(sizeof(type) == size, "sizeof(" #type ") == %d (expected " #size ")\n", sizeof(type)) ok(sizeof(type) == size, "sizeof(" #type ") == %d (expected " #size ")\n", ((int) sizeof(type)))
/*********************************************************************** /***********************************************************************
* Test macros * Test macros
......
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
# define TEST_FIELD_ALIGNMENT(type, field, align) \ # define TEST_FIELD_ALIGNMENT(type, field, align) \
ok(FIELD_ALIGNMENT(type, field) == align, \ ok(FIELD_ALIGNMENT(type, field) == align, \
"FIELD_ALIGNMENT(" #type ", " #field ") == %d (expected " #align ")\n", \ "FIELD_ALIGNMENT(" #type ", " #field ") == %d (expected " #align ")\n", \
FIELD_ALIGNMENT(type, field)) (int)FIELD_ALIGNMENT(type, field))
#else #else
# define TEST_FIELD_ALIGNMENT(type, field, align) do { } while (0) # define TEST_FIELD_ALIGNMENT(type, field, align) do { } while (0)
#endif #endif
...@@ -75,24 +75,24 @@ ...@@ -75,24 +75,24 @@
#define TEST_FIELD_OFFSET(type, field, offset) \ #define TEST_FIELD_OFFSET(type, field, offset) \
ok(FIELD_OFFSET(type, field) == offset, \ ok(FIELD_OFFSET(type, field) == offset, \
"FIELD_OFFSET(" #type ", " #field ") == %ld (expected " #offset ")\n", \ "FIELD_OFFSET(" #type ", " #field ") == %ld (expected " #offset ")\n", \
FIELD_OFFSET(type, field)) (long int)FIELD_OFFSET(type, field))
#ifdef _TYPE_ALIGNMENT #ifdef _TYPE_ALIGNMENT
#define TEST__TYPE_ALIGNMENT(type, align) \ #define TEST__TYPE_ALIGNMENT(type, align) \
ok(_TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", _TYPE_ALIGNMENT(type)) ok(_TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", (int)_TYPE_ALIGNMENT(type))
#else #else
# define TEST__TYPE_ALIGNMENT(type, align) do { } while (0) # define TEST__TYPE_ALIGNMENT(type, align) do { } while (0)
#endif #endif
#ifdef TYPE_ALIGNMENT #ifdef TYPE_ALIGNMENT
#define TEST_TYPE_ALIGNMENT(type, align) \ #define TEST_TYPE_ALIGNMENT(type, align) \
ok(TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", TYPE_ALIGNMENT(type)) ok(TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", (int)TYPE_ALIGNMENT(type))
#else #else
# define TEST_TYPE_ALIGNMENT(type, align) do { } while (0) # define TEST_TYPE_ALIGNMENT(type, align) do { } while (0)
#endif #endif
#define TEST_TYPE_SIZE(type, size) \ #define TEST_TYPE_SIZE(type, size) \
ok(sizeof(type) == size, "sizeof(" #type ") == %d (expected " #size ")\n", sizeof(type)) ok(sizeof(type) == size, "sizeof(" #type ") == %d (expected " #size ")\n", ((int) sizeof(type)))
/*********************************************************************** /***********************************************************************
* Test macros * Test macros
......
...@@ -540,7 +540,7 @@ sub output_header($$$) { ...@@ -540,7 +540,7 @@ sub output_header($$$) {
print OUT "# define TEST_FIELD_ALIGNMENT(type, field, align) \\\n"; print OUT "# define TEST_FIELD_ALIGNMENT(type, field, align) \\\n";
print OUT " ok(FIELD_ALIGNMENT(type, field) == align, \\\n"; print OUT " ok(FIELD_ALIGNMENT(type, field) == align, \\\n";
print OUT " \"FIELD_ALIGNMENT(\" #type \", \" #field \") == %d (expected \" #align \")\\n\", \\\n"; print OUT " \"FIELD_ALIGNMENT(\" #type \", \" #field \") == %d (expected \" #align \")\\n\", \\\n";
print OUT " FIELD_ALIGNMENT(type, field))\n"; print OUT " (int)FIELD_ALIGNMENT(type, field))\n";
print OUT "#else\n"; print OUT "#else\n";
print OUT "# define TEST_FIELD_ALIGNMENT(type, field, align) do { } while (0)\n"; print OUT "# define TEST_FIELD_ALIGNMENT(type, field, align) do { } while (0)\n";
print OUT "#endif\n"; print OUT "#endif\n";
...@@ -548,24 +548,24 @@ sub output_header($$$) { ...@@ -548,24 +548,24 @@ sub output_header($$$) {
print OUT "#define TEST_FIELD_OFFSET(type, field, offset) \\\n"; print OUT "#define TEST_FIELD_OFFSET(type, field, offset) \\\n";
print OUT " ok(FIELD_OFFSET(type, field) == offset, \\\n"; print OUT " ok(FIELD_OFFSET(type, field) == offset, \\\n";
print OUT " \"FIELD_OFFSET(\" #type \", \" #field \") == %ld (expected \" #offset \")\\n\", \\\n"; print OUT " \"FIELD_OFFSET(\" #type \", \" #field \") == %ld (expected \" #offset \")\\n\", \\\n";
print OUT " FIELD_OFFSET(type, field))\n"; print OUT " (long int)FIELD_OFFSET(type, field))\n";
print OUT "\n"; print OUT "\n";
print OUT "#ifdef _TYPE_ALIGNMENT\n"; print OUT "#ifdef _TYPE_ALIGNMENT\n";
print OUT "#define TEST__TYPE_ALIGNMENT(type, align) \\\n"; print OUT "#define TEST__TYPE_ALIGNMENT(type, align) \\\n";
print OUT " ok(_TYPE_ALIGNMENT(type) == align, \"TYPE_ALIGNMENT(\" #type \") == %d (expected \" #align \")\\n\", _TYPE_ALIGNMENT(type))\n"; print OUT " ok(_TYPE_ALIGNMENT(type) == align, \"TYPE_ALIGNMENT(\" #type \") == %d (expected \" #align \")\\n\", (int)_TYPE_ALIGNMENT(type))\n";
print OUT "#else\n"; print OUT "#else\n";
print OUT "# define TEST__TYPE_ALIGNMENT(type, align) do { } while (0)\n"; print OUT "# define TEST__TYPE_ALIGNMENT(type, align) do { } while (0)\n";
print OUT "#endif\n"; print OUT "#endif\n";
print OUT "\n"; print OUT "\n";
print OUT "#ifdef TYPE_ALIGNMENT\n"; print OUT "#ifdef TYPE_ALIGNMENT\n";
print OUT "#define TEST_TYPE_ALIGNMENT(type, align) \\\n"; print OUT "#define TEST_TYPE_ALIGNMENT(type, align) \\\n";
print OUT " ok(TYPE_ALIGNMENT(type) == align, \"TYPE_ALIGNMENT(\" #type \") == %d (expected \" #align \")\\n\", TYPE_ALIGNMENT(type))\n"; print OUT " ok(TYPE_ALIGNMENT(type) == align, \"TYPE_ALIGNMENT(\" #type \") == %d (expected \" #align \")\\n\", (int)TYPE_ALIGNMENT(type))\n";
print OUT "#else\n"; print OUT "#else\n";
print OUT "# define TEST_TYPE_ALIGNMENT(type, align) do { } while (0)\n"; print OUT "# define TEST_TYPE_ALIGNMENT(type, align) do { } while (0)\n";
print OUT "#endif\n"; print OUT "#endif\n";
print OUT "\n"; print OUT "\n";
print OUT "#define TEST_TYPE_SIZE(type, size) \\\n"; print OUT "#define TEST_TYPE_SIZE(type, size) \\\n";
print OUT " ok(sizeof(type) == size, \"sizeof(\" #type \") == %d (expected \" #size \")\\n\", sizeof(type))\n"; print OUT " ok(sizeof(type) == size, \"sizeof(\" #type \") == %d (expected \" #size \")\\n\", ((int) sizeof(type)))\n";
print OUT "\n"; print OUT "\n";
print OUT "/***********************************************************************\n"; print OUT "/***********************************************************************\n";
print OUT " * Test macros\n"; print OUT " * Test macros\n";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment