blob: c5c98a2e3a0b5f7a04053926bd3e1ce420a9f1ce (
plain)
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
|
From 8af410e10a4e20c8ca87b1e8904bcd7c05344ace Mon Sep 17 00:00:00 2001
From: Remi Collet <remi@remirepo.net>
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
|