Skip to content

Commit

Permalink
Fixed: warnings when compiling with -Wall
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick Allaert committed Aug 3, 2015
1 parent b8779d7 commit b37703b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
9 changes: 4 additions & 5 deletions backtrace.c
Expand Up @@ -465,11 +465,7 @@ static void append_flat_zval_r(zval *expr TSRMLS_DC, smart_str *trace_str, char

static void append_flat_hash(HashTable *ht TSRMLS_DC, smart_str *trace_str, char is_object, char depth)
{
char * temp;
HashPosition iterator;
uint str_len;
int i = 0;
int new_len;

#if PHP_VERSION_ID >= 70000
zval *tmp;
Expand All @@ -479,8 +475,11 @@ static void append_flat_hash(HashTable *ht TSRMLS_DC, smart_str *trace_str, char
ZEND_HASH_FOREACH_KEY_VAL_IND(ht, num_key, string_key, tmp) {
#else
zval **tmp;
char *string_key;
char *string_key, *temp;
ulong num_key;
int new_len;
uint str_len;
HashPosition iterator;

zend_hash_internal_pointer_reset_ex(ht, &iterator);
while (zend_hash_get_current_data_ex(ht, (void **) &tmp, &iterator) == SUCCESS) {
Expand Down
2 changes: 1 addition & 1 deletion driver_socket.c
Expand Up @@ -203,7 +203,7 @@ int apm_driver_socket_rshutdown(TSRMLS_D)
zend_is_auto_global_str(ZEND_STRL("_SERVER"));
if ((tmp = &PG(http_globals)[TRACK_VARS_SERVER])) {
if ((val = zend_hash_str_find(Z_ARRVAL_P(tmp), "REQUEST_TIME", sizeof("REQUEST_TIME"))) && (Z_TYPE_P(val) == IS_LONG)) {
add_assoc_long_ex(&data, "ts", sizeof("ts") - 1, Z_LVAL_PP(val));
add_assoc_long_ex(&data, "ts", sizeof("ts") - 1, Z_LVAL_P(val));
}
if ((val = zend_hash_str_find(Z_ARRVAL_P(tmp), "SCRIPT_FILENAME", sizeof("SCRIPT_FILENAME"))) && (Z_TYPE_P(val) == IS_STRING)) {
zval_add_ref(val);
Expand Down
8 changes: 4 additions & 4 deletions php_apm.h
Expand Up @@ -358,19 +358,19 @@ void get_script(char ** script_filename TSRMLS_DC);
zend_is_auto_global_str(ZEND_STRL("_SERVER")); \
if ((tmp = &PG(http_globals)[TRACK_VARS_SERVER])) { \
if ((APM_RD(uri) = zend_hash_str_find(Z_ARRVAL_P(tmp), "REQUEST_URI", sizeof("REQUEST_URI"))) && \
(Z_TYPE_PP(APM_RD(uri)) == IS_STRING)) { \
(Z_TYPE_P(APM_RD(uri)) == IS_STRING)) { \
APM_RD(uri_found) = 1; \
} \
if ((APM_RD(host) = zend_hash_str_find(Z_ARRVAL_P(tmp), "HTTP_HOST", sizeof("HTTP_HOST"))) && \
(Z_TYPE_PP(APM_RD(host)) == IS_STRING)) { \
(Z_TYPE_P(APM_RD(host)) == IS_STRING)) { \
APM_RD(host_found) = 1; \
} \
if (APM_G(store_ip) && (APM_RD(ip) = zend_hash_str_find(Z_ARRVAL_P(tmp), "REMOTE_ADDR", sizeof("REMOTE_ADDR"))) && \
(Z_TYPE_PP(APM_RD(ip)) == IS_STRING)) { \
(Z_TYPE_P(APM_RD(ip)) == IS_STRING)) { \
APM_RD(ip_found) = 1; \
} \
if ((APM_RD(referer) = zend_hash_str_find(Z_ARRVAL_P(tmp), "HTTP_REFERER", sizeof("HTTP_REFERER"))) && \
(Z_TYPE_PP(APM_RD(referer)) == IS_STRING)) { \
(Z_TYPE_P(APM_RD(referer)) == IS_STRING)) { \
APM_RD(referer_found) = 1; \
} \
} \
Expand Down

0 comments on commit b37703b

Please sign in to comment.