]> granicus.if.org Git - php/commitdiff
- void is NaN, you can't do math ops on void. Declarations go first. Fix TS build
authorPierre Joye <pajoye@php.net>
Mon, 30 Nov 2009 10:56:01 +0000 (10:56 +0000)
committerPierre Joye <pajoye@php.net>
Mon, 30 Nov 2009 10:56:01 +0000 (10:56 +0000)
ext/mysqlnd/mysqlnd.c
ext/mysqlnd/mysqlnd_result.c
ext/mysqlnd/mysqlnd_wireprotocol.c
ext/mysqlnd/php_mysqlnd.c

index 365068d60c42d0d3ab85c53f12447d8abe4998e0..3d4b02677af70ae1829bd5948a3e2d0ee4948139 100644 (file)
@@ -2393,7 +2393,7 @@ PHPAPI void ** _mysqlnd_plugin_get_plugin_connection_data(const MYSQLND * conn,
        if (!conn || plugin_id >= mysqlnd_plugin_count()) {
                return NULL;
        }
-       DBG_RETURN((void *)conn + sizeof(MYSQLND) + plugin_id * sizeof(void *));
+       DBG_RETURN((void *)(conn + sizeof(MYSQLND) + plugin_id * sizeof(void *)));
 }
 /* }}} */
 
index 82b396c6747bd7619defc955cac6bbcc981fe933..a1877e38cb5ecf77191d72e6558afadd7ebfa89f 100644 (file)
@@ -2073,7 +2073,7 @@ PHPAPI void ** _mysqlnd_plugin_get_plugin_result_data(const MYSQLND_RES * result
        if (!result || plugin_id >= mysqlnd_plugin_count()) {
                return NULL;
        }
-       DBG_RETURN((void *)result + sizeof(MYSQLND_RES) + plugin_id * sizeof(void *));
+       DBG_RETURN((void *)(result + sizeof(MYSQLND_RES) + plugin_id * sizeof(void *)));
 }
 /* }}} */
 
index b4a94b18e15e2a6fc330e70a7bf93cd5f0e77bfd..b6b4ede3a9f2e2230b7c68a9e9fe9f238504d460 100644 (file)
@@ -1307,8 +1307,8 @@ php_mysqlnd_rset_header_read(void *_packet, MYSQLND *conn TSRMLS_DC)
 static
 void php_mysqlnd_rset_header_free_mem(void *_packet, zend_bool alloca TSRMLS_DC)
 {
-       DBG_ENTER("php_mysqlnd_rset_header_free_mem");
        php_mysql_packet_rset_header *p= (php_mysql_packet_rset_header *) _packet;
+       DBG_ENTER("php_mysqlnd_rset_header_free_mem");
        if (p->info_or_local_file) {
                mnd_efree(p->info_or_local_file);
                p->info_or_local_file = NULL;
index 59ed0abc76669ab3f720b50e98e08e8035665d8e..585e5d86a7a33a6d5d4325d279d8fa1931d9730c 100644 (file)
@@ -45,14 +45,14 @@ PHPAPI void mysqlnd_minfo_print_hash(zval *values)
 
        zend_hash_internal_pointer_reset_ex(Z_ARRVAL_P(values), &pos_values);
        while (zend_hash_get_current_data_ex(Z_ARRVAL_P(values),
-                                                                               (void **)&values_entry, &pos_values) == SUCCESS) {
-               TSRMLS_FETCH();
+               (void **)&values_entry, &pos_values) == SUCCESS) {
                zstr    string_key;
                uint    string_key_len;
                ulong   num_key;
                int     s_len;
                char    *s = NULL;
 
+               TSRMLS_FETCH();
                zend_hash_get_current_key_ex(Z_ARRVAL_P(values), &string_key, &string_key_len, &num_key, 0, &pos_values);
 
                convert_to_string(*values_entry);