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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
|
From b62f2d591937b766cd3d0a0d5731d2481ac33807 Mon Sep 17 00:00:00 2001
From: Remi Collet <remi@remirepo.net>
Date: Wed, 22 Jan 2025 15:50:22 +0100
Subject: [PATCH] Fix incomplete function prototypes
---
php_zmq_pollset.h | 6 +++---
php_zmq_private.h | 20 ++++++++++----------
zmq.c | 4 ++--
zmq_clock.c | 2 +-
zmq_helpers.c | 4 ++--
zmq_pollset.c | 2 +-
zmq_shared_ctx.c | 10 +++++-----
7 files changed, 24 insertions(+), 24 deletions(-)
diff --git a/php_zmq_pollset.h b/php_zmq_pollset.h
index 1df9c3a..9bb0af4 100644
--- a/php_zmq_pollset.h
+++ b/php_zmq_pollset.h
@@ -40,9 +40,9 @@
#define PHP_ZMQ_POLLSET_ERR_INVALID_TYPE -7
-/** {{{ php_zmq_pollset *php_zmq_pollset_init();
+/** {{{ php_zmq_pollset *php_zmq_pollset_init(void);
*/
-php_zmq_pollset *php_zmq_pollset_init();
+php_zmq_pollset *php_zmq_pollset_init(void);
/* }}} */
/** {{{ zend_bool php_zmq_pollset_items(php_zmq_pollset *set, zval *return_value);
@@ -83,7 +83,7 @@ size_t php_zmq_pollset_num_items(php_zmq_pollset *set);
/** {{{ void php_zmq_pollset_delete_all(php_zmq_pollset *set);
*/
-zval *php_zmq_pollset_errors();
+zval *php_zmq_pollset_errors(php_zmq_pollset *set);
/* }}} */
/** {{{ void php_zmq_pollset_deinit(php_zmq_pollset **set);
diff --git a/php_zmq_private.h b/php_zmq_private.h
index 2e5cd3b..7c86376 100644
--- a/php_zmq_private.h
+++ b/php_zmq_private.h
@@ -190,8 +190,8 @@ PHP_METHOD(zmqsocket, getsockopt);
PHP_METHOD(zmqsocket, setsockopt);
zend_bool php_zmq_device(php_zmq_device_object *intern);
-zend_class_entry *php_zmq_socket_exception_sc_entry_get ();
-zend_class_entry *php_zmq_device_exception_sc_entry_get ();
+zend_class_entry *php_zmq_socket_exception_sc_entry_get (void);
+zend_class_entry *php_zmq_device_exception_sc_entry_get (void);
php_stream *php_zmq_create_zmq_fd(zval *obj);
@@ -199,30 +199,30 @@ void php_zmq_register_sockopt_constants (zend_class_entry *ce);
typedef struct _php_zmq_clock_ctx_t php_zmq_clock_ctx_t;
-php_zmq_clock_ctx_t *php_zmq_clock_init ();
+php_zmq_clock_ctx_t *php_zmq_clock_init (void);
uint64_t php_zmq_clock (php_zmq_clock_ctx_t *clock_ctx);
void php_zmq_clock_destroy (php_zmq_clock_ctx_t **clock_ctx);
-char *php_zmq_get_libzmq_version();
+char *php_zmq_get_libzmq_version(void);
-zend_long php_zmq_get_libzmq_version_id();
+zend_long php_zmq_get_libzmq_version_id(void);
char *php_zmq_printable_func (zend_fcall_info *fci, zend_fcall_info_cache *fci_cache);
-zend_bool php_zmq_shared_ctx_init();
+zend_bool php_zmq_shared_ctx_init(void);
void php_zmq_shared_ctx_assign_to(php_zmq_context *context);
-void php_zmq_shared_ctx_destroy();
+void php_zmq_shared_ctx_destroy(void);
-int php_zmq_shared_ctx_socket_count();
+int php_zmq_shared_ctx_socket_count(void);
-void php_zmq_shared_ctx_socket_count_incr();
+void php_zmq_shared_ctx_socket_count_incr(void);
-void php_zmq_shared_ctx_socket_count_decr();
+void php_zmq_shared_ctx_socket_count_decr(void);
diff --git a/zmq.c b/zmq.c
index bd2401d..1fd9736 100644
--- a/zmq.c
+++ b/zmq.c
@@ -71,12 +71,12 @@ zend_class_entry *php_zmq_context_exception_sc_entry_get ()
return php_zmq_context_exception_sc_entry;
}
-zend_class_entry *php_zmq_socket_exception_sc_entry_get ()
+zend_class_entry *php_zmq_socket_exception_sc_entry_get (void)
{
return php_zmq_socket_exception_sc_entry;
}
-zend_class_entry *php_zmq_device_exception_sc_entry_get ()
+zend_class_entry *php_zmq_device_exception_sc_entry_get (void)
{
return php_zmq_device_exception_sc_entry;
}
diff --git a/zmq_clock.c b/zmq_clock.c
index 6533297..8e6950a 100644
--- a/zmq_clock.c
+++ b/zmq_clock.c
@@ -73,7 +73,7 @@ uint64_t s_backup_clock ()
struct _php_zmq_clock_ctx_t {};
-php_zmq_clock_ctx_t *php_zmq_clock_init ()
+php_zmq_clock_ctx_t *php_zmq_clock_init (void)
{
return
malloc (sizeof (php_zmq_clock_ctx_t));
diff --git a/zmq_helpers.c b/zmq_helpers.c
index dfae5a6..30c3eaa 100644
--- a/zmq_helpers.c
+++ b/zmq_helpers.c
@@ -33,7 +33,7 @@
/** {{{ char *php_zmq_libzmq_version()
*/
-char *php_zmq_get_libzmq_version()
+char *php_zmq_get_libzmq_version(void)
{
char *buffer = NULL;
@@ -47,7 +47,7 @@ char *php_zmq_get_libzmq_version()
/** {{{ zend_long php_zmq_libzmq_version_id()
*/
-zend_long php_zmq_get_libzmq_version_id()
+zend_long php_zmq_get_libzmq_version_id(void)
{
int major = 0, minor = 0, patch = 0;
diff --git a/zmq_pollset.c b/zmq_pollset.c
index 0bf1098..2aeb96c 100644
--- a/zmq_pollset.c
+++ b/zmq_pollset.c
@@ -184,7 +184,7 @@ zend_string *s_create_key(zval *entry)
}
}
-php_zmq_pollset *php_zmq_pollset_init()
+php_zmq_pollset *php_zmq_pollset_init(void)
{
php_zmq_pollset *set = ecalloc (1, sizeof(php_zmq_pollset));
diff --git a/zmq_shared_ctx.c b/zmq_shared_ctx.c
index 2d86d91..0672ecb 100644
--- a/zmq_shared_ctx.c
+++ b/zmq_shared_ctx.c
@@ -136,7 +136,7 @@ void s_shared_ctx_destroy()
}
#endif
-zend_bool php_zmq_shared_ctx_init()
+zend_bool php_zmq_shared_ctx_init(void)
{
return
s_shared_ctx_init();
@@ -150,7 +150,7 @@ void php_zmq_shared_ctx_assign_to(php_zmq_context *context)
}
}
-void php_zmq_shared_ctx_destroy()
+void php_zmq_shared_ctx_destroy(void)
{
if (php_zmq_shared_ctx_socket_count() > 0) {
php_error_docref(NULL, E_WARNING, "php_zmq_shared_ctx_socket_count() > 0, please report a bug");
@@ -158,7 +158,7 @@ void php_zmq_shared_ctx_destroy()
s_shared_ctx_destroy();
}
-int php_zmq_shared_ctx_socket_count()
+int php_zmq_shared_ctx_socket_count(void)
{
int value = 0;
@@ -169,7 +169,7 @@ int php_zmq_shared_ctx_socket_count()
return value;
}
-void php_zmq_shared_ctx_socket_count_incr()
+void php_zmq_shared_ctx_socket_count_incr(void)
{
if (s_shared_ctx_lock()) {
s_ctx_socket_count++;
@@ -177,7 +177,7 @@ void php_zmq_shared_ctx_socket_count_incr()
}
}
-void php_zmq_shared_ctx_socket_count_decr()
+void php_zmq_shared_ctx_socket_count_decr(void)
{
if (s_shared_ctx_lock()) {
s_ctx_socket_count--;
|