Skip to content

Commit 0956267

Browse files
committed
Fix warnings in session/spl
This fixes -Winline errors where the functions are not ever inlined. Also fixes some signature mismatches which were fixed previously but for whatever reason were not ported to all maintained branches: /usr/local/src/php/ext/session/session.c:1299:20: warning:conflicting types for 'php_session_send_cookie' due to enum/integer mismatch; have 'zend_result(void)' {aka 'ZEND_RESULT_CODE(void)'} [-Wenum-int-mismatch] 1299 | static zend_result php_session_send_cookie(void) /* {{{ */ | ^~~~~~~~~~~~~~~~~~~~~~~ /usr/local/src/php/ext/session/session.c:100:12: note: previous declaration of 'php_session_send_cookie' with type 'int(void)' 100 | static int php_session_send_cookie(void); | ^~~~~~~~~~~~~~~~~~~~~~~
1 parent acf758d commit 0956267

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

ext/session/session.c

+5-5
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@
5656

5757
PHPAPI ZEND_DECLARE_MODULE_GLOBALS(ps)
5858

59-
static int php_session_rfc1867_callback(unsigned int event, void *event_data, void **extra);
60-
static int (*php_session_rfc1867_orig_callback)(unsigned int event, void *event_data, void **extra);
59+
static zend_result php_session_rfc1867_callback(unsigned int event, void *event_data, void **extra);
60+
static zend_result (*php_session_rfc1867_orig_callback)(unsigned int event, void *event_data, void **extra);
6161
static void php_session_track_init(void);
6262

6363
/* SessionHandler class */
@@ -97,8 +97,8 @@ zend_class_entry *php_session_update_timestamp_iface_entry;
9797

9898
#define APPLY_TRANS_SID (PS(use_trans_sid) && !PS(use_only_cookies))
9999

100-
static int php_session_send_cookie(void);
101-
static int php_session_abort(void);
100+
static zend_result php_session_send_cookie(void);
101+
static zend_result php_session_abort(void);
102102

103103
/* Initialized in MINIT, readonly otherwise. */
104104
static int my_module_number = 0;
@@ -122,7 +122,7 @@ static inline void php_rinit_session_globals(void) /* {{{ */
122122
/* }}} */
123123

124124
/* Dispatched by RSHUTDOWN and by php_session_destroy */
125-
static inline void php_rshutdown_session_globals(void) /* {{{ */
125+
static void php_rshutdown_session_globals(void) /* {{{ */
126126
{
127127
/* Do NOT destroy PS(mod_user_names) here! */
128128
if (!Z_ISUNDEF(PS(http_session_vars))) {

ext/spl/spl_directory.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ PHPAPI zend_string *spl_filesystem_object_get_path(spl_filesystem_object *intern
240240
return zend_string_copy(intern->path);
241241
} /* }}} */
242242

243-
static inline zend_result spl_filesystem_object_get_file_name(spl_filesystem_object *intern) /* {{{ */
243+
static zend_result spl_filesystem_object_get_file_name(spl_filesystem_object *intern) /* {{{ */
244244
{
245245
if (intern->file_name) {
246246
/* already known */

ext/spl/spl_heap.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ static zend_result spl_heap_object_count_elements(zend_object *object, zend_long
501501
}
502502
/* }}} */
503503

504-
static inline HashTable* spl_heap_object_get_debug_info(zend_class_entry *ce, zend_object *obj) { /* {{{ */
504+
static HashTable* spl_heap_object_get_debug_info(zend_class_entry *ce, zend_object *obj) { /* {{{ */
505505
spl_heap_object *intern = spl_heap_from_obj(obj);
506506
zval tmp, heap_array;
507507
zend_string *pnstr;

0 commit comments

Comments
 (0)