From 8af410e10a4e20c8ca87b1e8904bcd7c05344ace Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 19 Feb 2024 14:56:01 +0100 Subject: [PATCH] Fix [-Wincompatible-pointer-types] --- php_stats.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/php_stats.c b/php_stats.c index 7418dd8..851cb12 100644 --- a/php_stats.c +++ b/php_stats.c @@ -111,17 +111,20 @@ PHP_MINFO_FUNCTION(stats) * * This is not correct any more, depends on what compare_func is set to. */ +#if PHP_VERSION_ID < 80000 static int stats_array_data_compare(const void *a, const void *b) { - Bucket *f; - Bucket *s; + Bucket *f = (Bucket *) a; + Bucket *s = (Bucket *) b; +#else +static int stats_array_data_compare(Bucket *f, Bucket *s) +{ +#endif + int result; zval first; zval second; - f = (Bucket *) a; - s = (Bucket *) b; - first = f->val; second = s->val; -- 2.43.2