Skip to content

Commit ab5e908

Browse files
committed
Fixed compilation warnings in 32-bit build
1 parent 14db5fa commit ab5e908

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

sapi/phpdbg/phpdbg_watch.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ static void phpdbg_change_watchpoint_access(phpdbg_watchpoint_t *watch, int acce
240240
#ifdef HAVE_USERFAULTFD_WRITEFAULT
241241
if (PHPDBG_G(watch_userfaultfd)) {
242242
struct uffdio_range range = {
243-
.start = (__u64) page_addr,
243+
.start = (__u64)(uintptr_t) page_addr,
244244
.len = size
245245
};
246246
if (access == PROT_READ) {
@@ -312,12 +312,12 @@ void *phpdbg_watchpoint_userfaultfd_thread(void *phpdbg_globals) {
312312

313313
struct uffd_msg fault_msg = {0};
314314
while (read(globals->watch_userfaultfd, &fault_msg, sizeof(fault_msg)) == sizeof(fault_msg)) {
315-
void *page = phpdbg_get_page_boundary((char *) fault_msg.arg.pagefault.address);
315+
void *page = phpdbg_get_page_boundary((char *)(uintptr_t) fault_msg.arg.pagefault.address);
316316
zend_hash_index_add_empty_element(globals->watchlist_mem, (zend_ulong) page);
317317
struct uffdio_writeprotect unprotect = {
318318
.mode = 0,
319319
.range = {
320-
.start = (__u64) page,
320+
.start = (__u64)(uintptr_t) page,
321321
.len = phpdbg_pagesize
322322
}
323323
};

0 commit comments

Comments
 (0)