com php-src: Fixed compilation warnings: Zend/zend_arena.h Zend/zend_execute.h
| From: | Dmitry Stogov | Date: | Thu, 04 Sep 2014 10:06:22 +0000 |
| Subject: | com php-src: Fixed compilation warnings: Zend/zend_arena.h Zend/zend_execute.h | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-81420@lists.php.net to get a copy of this message | ||
Commit: 92164f6b7bceb70645d2d5224f5209ff4d417e9b
Author: Dmitry Stogov <dmitry@zend.com> Thu, 4 Sep 2014 14:06:22 +0400
Parents: 39c3207896cc1012e6be7bfbdacaf807cfb97640
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=92164f6b7bceb70645d2d5224f5209ff4d417e9b
Log:
Fixed compilation warnings
Changed paths:
M Zend/zend_arena.h
M Zend/zend_execute.h
Diff:
diff --git a/Zend/zend_arena.h b/Zend/zend_arena.h
index 0a1d6f1..12c5db6 100644
--- a/Zend/zend_arena.h
+++ b/Zend/zend_arena.h
@@ -65,7 +65,7 @@ static zend_always_inline void* zend_arena_alloc(zend_arena **arena_ptr, size_t
size_t arena_size =
UNEXPECTED((size + ZEND_MM_ALIGNED_SIZE(sizeof(zend_arena))) > (size_t)(arena->end -
(char*) arena)) ?
(size + ZEND_MM_ALIGNED_SIZE(sizeof(zend_arena))) :
- (arena->end - (char*) arena);
+ (size_t)(arena->end - (char*) arena);
zend_arena *new_arena = (zend_arena*)emalloc(arena_size);
ptr = (char*) new_arena + ZEND_MM_ALIGNED_SIZE(sizeof(zend_arena));
diff --git a/Zend/zend_execute.h b/Zend/zend_execute.h
index 77e6a9e..614cb07 100644
--- a/Zend/zend_execute.h
+++ b/Zend/zend_execute.h
@@ -186,9 +186,9 @@ static zend_always_inline void zend_vm_stack_destroy(TSRMLS_D)
}
}
-static zend_always_inline void zend_vm_stack_extend(int count TSRMLS_DC)
+static zend_always_inline void zend_vm_stack_extend(uint32_t count TSRMLS_DC)
{
- int size = count * ZEND_MM_ALIGNED_SIZE(sizeof(zval));
+ uint32_t size = count * ZEND_MM_ALIGNED_SIZE(sizeof(zval));
zend_vm_stack p = zend_vm_stack_new_page(
(size >= (ZEND_VM_STACK_PAGE_SIZE - ZEND_VM_STACK_HEADER_SLOT) *
ZEND_MM_ALIGNED_SIZE(sizeof(zval))) ?
(size + ((ZEND_VM_STACK_HEADER_SLOT + ZEND_VM_STACK_PAGE_SIZE) *
ZEND_MM_ALIGNED_SIZE(sizeof(zval))) - 1) &
@@ -200,7 +200,7 @@ static zend_always_inline void zend_vm_stack_extend(int count TSRMLS_DC)
static zend_always_inline zend_execute_data *zend_vm_stack_push_call_frame(zend_function *func,
uint32_t num_args, zend_uchar flags, zend_class_entry *called_scope, zend_object *object,
zend_execute_data *prev TSRMLS_DC)
{
- int used_stack = ZEND_CALL_FRAME_SLOT + num_args;
+ uint32_t used_stack = ZEND_CALL_FRAME_SLOT + num_args;
zend_execute_data *call;
if (ZEND_USER_CODE(func->type)) {