From a0300b15a3afffe02c737d263c3d6dd31ac307b7 Mon Sep 17 00:00:00 2001 From: xXx-caillou-xXx Date: Tue, 28 Aug 2018 18:16:11 +0200 Subject: Fix some compilation warnings --- src/sp_utils.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/sp_utils.c') diff --git a/src/sp_utils.c b/src/sp_utils.c index cb6b4a7..41d817e 100644 --- a/src/sp_utils.c +++ b/src/sp_utils.c @@ -9,8 +9,8 @@ ZEND_DECLARE_MODULE_GLOBALS(snuffleupagus) -static bool sp_zend_string_equals(const zend_string* s1, - const zend_string* s2) { +bool sp_zend_string_equals(const zend_string* s1, + const zend_string* s2) { // We can't use `zend_string_equals` here because it doesn't work on // `const` zend_string. return ZSTR_LEN(s1) == ZSTR_LEN(s2) && @@ -113,8 +113,9 @@ int sp_log_request(const zend_string* folder, const zend_string* text_repr, HashTable* ht = Z_ARRVAL(PG(http_globals)[zones[i].key]); fprintf(file, "%s:", zones[i].str); ZEND_HASH_FOREACH_STR_KEY_VAL(ht, variable_key, variable_value) { - smart_str a = {0}; + smart_str a; + memset(&a, 0, sizeof(a)); php_var_export_ex(variable_value, 1, &a); ZSTR_VAL(a.s)[ZSTR_LEN(a.s)] = '\0'; fprintf(file, "%s=%s ", ZSTR_VAL(variable_key), ZSTR_VAL(a.s)); -- cgit v1.3