andrey Wed, 16 Mar 2011 11:51:56 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=309301
Log: compiler warnings fixed Changed paths: U php/php-src/trunk/ext/mysqlnd/mysqlnd_loaddata.c U php/php-src/trunk/ext/mysqlnd/mysqlnd_ps.c U php/php-src/trunk/ext/mysqlnd/mysqlnd_structs.h Modified: php/php-src/trunk/ext/mysqlnd/mysqlnd_loaddata.c =================================================================== --- php/php-src/trunk/ext/mysqlnd/mysqlnd_loaddata.c 2011-03-16 11:14:33 UTC (rev 309300) +++ php/php-src/trunk/ext/mysqlnd/mysqlnd_loaddata.c 2011-03-16 11:51:56 UTC (rev 309301) @@ -85,14 +85,14 @@ /* {{{ mysqlnd_local_infile_read */ static -int mysqlnd_local_infile_read(void *ptr, char *buf, unsigned int buf_len TSRMLS_DC) +int mysqlnd_local_infile_read(void *ptr, zend_uchar * buf, unsigned int buf_len TSRMLS_DC) { MYSQLND_INFILE_INFO *info = (MYSQLND_INFILE_INFO *)ptr; int count; DBG_ENTER("mysqlnd_local_infile_read"); - count = (int)php_stream_read(info->fd, buf, buf_len); + count = (int)php_stream_read(info->fd, (char *) buf, buf_len); if (count < 0) { strcpy(info->error_msg, "Error reading file"); @@ -173,8 +173,8 @@ enum_func_status mysqlnd_handle_local_infile(MYSQLND *conn, const char *filename, zend_bool *is_warning TSRMLS_DC) { - char *buf = NULL; - char empty_packet[MYSQLND_HEADER_SIZE]; + zend_uchar *buf = NULL; + zend_uchar empty_packet[MYSQLND_HEADER_SIZE]; enum_func_status result = FAIL; unsigned int buflen = 4096; void *info = NULL; @@ -194,7 +194,7 @@ infile = conn->infile; /* allocate buffer for reading data */ - buf = (char *)mnd_ecalloc(1, buflen); + buf = (zend_uchar *)mnd_ecalloc(1, buflen); *is_warning = FALSE; Modified: php/php-src/trunk/ext/mysqlnd/mysqlnd_ps.c =================================================================== --- php/php-src/trunk/ext/mysqlnd/mysqlnd_ps.c 2011-03-16 11:14:33 UTC (rev 309300) +++ php/php-src/trunk/ext/mysqlnd/mysqlnd_ps.c 2011-03-16 11:51:56 UTC (rev 309301) @@ -398,7 +398,7 @@ stmt_to_prepare = s_to_prepare->data; } - if (FAIL == stmt_to_prepare->conn->m->simple_command(stmt_to_prepare->conn, COM_STMT_PREPARE, query, query_len, PROT_LAST, FALSE, TRUE TSRMLS_CC) || + if (FAIL == stmt_to_prepare->conn->m->simple_command(stmt_to_prepare->conn, COM_STMT_PREPARE, (const zend_uchar *) query, query_len, PROT_LAST, FALSE, TRUE TSRMLS_CC) || FAIL == mysqlnd_stmt_read_prepare_response(s_to_prepare TSRMLS_CC)) { goto fail; @@ -694,7 +694,7 @@ ret = s->m->generate_execute_request(s, &request, &request_len, &free_request TSRMLS_CC); if (ret == PASS) { /* support for buffer types should be added here ! */ - ret = stmt->conn->m->simple_command(stmt->conn, COM_STMT_EXECUTE, (char *)request, request_len, + ret = stmt->conn->m->simple_command(stmt->conn, COM_STMT_EXECUTE, request, request_len, PROT_LAST /* we will handle the response packet*/, FALSE, FALSE TSRMLS_CC); } else { @@ -1036,7 +1036,7 @@ int4store(buf, stmt->stmt_id); int4store(buf + STMT_ID_LENGTH, 1); /* for now fetch only one row */ - if (FAIL == stmt->conn->m->simple_command(stmt->conn, COM_STMT_FETCH, (char *)buf, sizeof(buf), + if (FAIL == stmt->conn->m->simple_command(stmt->conn, COM_STMT_FETCH, buf, sizeof(buf), PROT_LAST /* we will handle the response packet*/, FALSE, TRUE TSRMLS_CC)) { stmt->error_info = stmt->conn->error_info; @@ -1259,7 +1259,7 @@ int4store(cmd_buf, stmt->stmt_id); if (CONN_GET_STATE(conn) == CONN_READY && - FAIL == (ret = conn->m->simple_command(conn, COM_STMT_RESET, (char *)cmd_buf, + FAIL == (ret = conn->m->simple_command(conn, COM_STMT_RESET, cmd_buf, sizeof(cmd_buf), PROT_OK_PACKET, FALSE, TRUE TSRMLS_CC))) { stmt->error_info = conn->error_info; @@ -1339,7 +1339,7 @@ memcpy(cmd_buf + STMT_ID_LENGTH + 2, data, length); /* COM_STMT_SEND_LONG_DATA doesn't send an OK packet*/ - ret = conn->m->simple_command(conn, cmd, (char *)cmd_buf, packet_len, PROT_LAST , FALSE, TRUE TSRMLS_CC); + ret = conn->m->simple_command(conn, cmd, cmd_buf, packet_len, PROT_LAST , FALSE, TRUE TSRMLS_CC); mnd_efree(cmd_buf); if (FAIL == ret) { stmt->error_info = conn->error_info; @@ -2182,7 +2182,7 @@ int4store(cmd_buf, stmt->stmt_id); if (CONN_GET_STATE(conn) == CONN_READY && - FAIL == conn->m->simple_command(conn, COM_STMT_CLOSE, (char *)cmd_buf, sizeof(cmd_buf), + FAIL == conn->m->simple_command(conn, COM_STMT_CLOSE, cmd_buf, sizeof(cmd_buf), PROT_LAST /* COM_STMT_CLOSE doesn't send an OK packet*/, FALSE, TRUE TSRMLS_CC)) { stmt->error_info = conn->error_info; Modified: php/php-src/trunk/ext/mysqlnd/mysqlnd_structs.h =================================================================== --- php/php-src/trunk/ext/mysqlnd/mysqlnd_structs.h 2011-03-16 11:14:33 UTC (rev 309300) +++ php/php-src/trunk/ext/mysqlnd/mysqlnd_structs.h 2011-03-16 11:51:56 UTC (rev 309301) @@ -132,7 +132,7 @@ typedef struct st_mysqlnd_infile { int (*local_infile_init)(void **ptr, char *filename, void **userdata TSRMLS_DC); - int (*local_infile_read)(void *ptr, char *buf, unsigned int buf_len TSRMLS_DC); + int (*local_infile_read)(void *ptr, zend_uchar * buf, unsigned int buf_len TSRMLS_DC); int (*local_infile_error)(void *ptr, char *error_msg, unsigned int error_msg_len TSRMLS_DC); void (*local_infile_end)(void *ptr TSRMLS_DC); zval *callback;
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php