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

16 lines
734 B
Text

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) {