ports/databases/libdbi-drivers/patches/patch-tests_cgreen_src_constraint_c

17 lines
734 B
Text
Raw Normal View History

2023-08-16 22:26:55 +00:00
clang 15 doesn't allow implicit conversions from intptr_t to pointer.
Index: tests/cgreen/src/constraint.c
--- tests/cgreen/src/constraint.c.orig
+++ tests/cgreen/src/constraint.c
@@ -164,8 +164,8 @@ static void test_want_double(Constraint *constraint, c
}
static int compare_using_matcher(Constraint *constraint, intptr_t actual) {
- int (*matches)(const void*) = constraint->expected;
- return matches(actual);
+ int (*matches)(const void*) = (int (*)(const void *))constraint->expected;
+ return matches((void *)actual);
}
static void test_with_matcher(Constraint *constraint, const char *function, const char* matcher_name, intptr_t matcher_function, const char *test_file, int test_line, TestReporter *reporter) {