com php-src: Fixed compiler warning "cast from pointer to integer of different size": ext/opcache/shared_alloc_shm.c ext/opc ache/zend_shared_alloc.c

From: Date: Thu, 18 Apr 2013 09:32:46 +0000
Subject: com php-src: Fixed compiler warning "cast from pointer to integer of different size": ext/opcache/shared_alloc_shm.c ext/opc ache/zend_shared_alloc.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-71946@lists.php.net to get a copy of this message
Commit: 0704e4badb3abdfbdd5efc2b6d51c8abd6e5629a Author: Xinchen Hui <laruence@php.net> Thu, 18 Apr 2013 17:32:46 +0800 Parents: 5a897009a83bba1a0f32982d7438d6967d1eddeb Branches: PHP-5.5 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=0704e4badb3abdfbdd5efc2b6d51c8abd6e5629a Log: Fixed compiler warning "cast from pointer to integer of different size" Changed paths: M ext/opcache/shared_alloc_shm.c M ext/opcache/zend_shared_alloc.c Diff: diff --git a/ext/opcache/shared_alloc_shm.c b/ext/opcache/shared_alloc_shm.c index d2b8423..d53236b 100644 --- a/ext/opcache/shared_alloc_shm.c +++ b/ext/opcache/shared_alloc_shm.c @@ -111,7 +111,7 @@ static int create_segments(size_t requested_size, zend_shared_segment_shm ***sha } shared_segments[i].common.p = shmat(shared_segments[i].shm_id, NULL, 0); - if (((int) shared_segments[i].common.p) == -1) { + if (shared_segments[i].common.p == (void *)-1) { *error_in = "shmat"; shmctl(shared_segments[i].shm_id, IPC_RMID, &sds); return ALLOC_FAILURE; diff --git a/ext/opcache/zend_shared_alloc.c b/ext/opcache/zend_shared_alloc.c index ebfdea2..5405751 100644 --- a/ext/opcache/zend_shared_alloc.c +++ b/ext/opcache/zend_shared_alloc.c @@ -137,7 +137,7 @@ static int zend_shared_alloc_try(const zend_shared_memory_handler_entry *he, int int i; /* cleanup */ for (i = 0; i < *shared_segments_count; i++) { - if ((*shared_segments_p)[i]->p && (int)(*shared_segments_p)[i]->p != -1) { + if ((*shared_segments_p)[i]->p && (*shared_segments_p)[i]->p != (void *)-1) { S_H(detach_segment)((*shared_segments_p)[i]); } }

« previous php.cvs (#71946) next »