php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #32173 exec.c: warning: cast from pointer to integer of different size
Submitted: 2005-03-03 15:21 UTC Modified: 2005-03-04 16:33 UTC
From: d dot tonhofer at m-plify dot com Assigned:
Status: Wont fix Package: Compile Warning
PHP Version: 4CVS, 5CVS (2005-03-04) OS: 64bit (*nix)
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: d dot tonhofer at m-plify dot com
New email:
PHP Version: OS:

 

 [2005-03-03 15:21 UTC] d dot tonhofer at m-plify dot com
Description:
------------
When compiling 4.3.10 on 64-bit Intel architecture, we get:

/usr/local/tarballs/php-4.3.10/ext/standard/exec.c: In function `proc_open_rsrc_dtor':
/usr/local/tarballs/php-4.3.10/ext/standard/exec.c:611: warning: cast from pointer to integer of different size

i.e.:


static void proc_open_rsrc_dtor(zend_rsrc_list_entry *rsrc TSRMLS_DC)
{
#ifdef PHP_WIN32
    HANDLE child;
    DWORD wstatus;

    child = (HANDLE)rsrc->ptr;
    WaitForSingleObject(child, INFINITE);
    GetExitCodeProcess(child, &wstatus);
    FG(pclose_ret) = wstatus;
    CloseHandle(child);
#else
# if HAVE_SYS_WAIT_H
    int wstatus;
    pid_t child, wait_pid;

    child = (pid_t)rsrc->ptr; <--------- HERE

    do {
        wait_pid = waitpid(child, &wstatus, 0);
    } while (wait_pid == -1 && errno == EINTR);

    if (wait_pid == -1)
        FG(pclose_ret) = -1;
    else {
        if (WIFEXITED(wstatus))
            wstatus = WEXITSTATUS(wstatus);
        FG(pclose_ret) = wstatus;
    }
    ....


Probably nothing, and probably related to 
http://bugs.php.net/bug.php?id=26769.






Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-03-04 14:14 UTC] d dot tonhofer at m-plify dot com
Tested on php4-STABLE-200503040930. 

Error still occurs, which is not surprising as the
code did not change.

Here is the complete list of warnings btw:


/usr/local/tarballs/php4-STABLE-200503040930/ext/standard/exec.c: In function `proc_open_rsrc_dtor':
/usr/local/tarballs/php4-STABLE-200503040930/ext/standard/exec.c:611: warning: cast from pointer to integer of different size

/usr/local/tarballs/php4-STABLE-200503040930/ext/standard/exec.c:
In function `zif_proc_open':
/usr/local/tarballs/php4-STABLE-200503040930/ext/standard/exec.c:1030: warning: cast to pointer from integer of different size
 [2005-03-04 16:33 UTC] sniper@php.net
Like you suspected, same issue as in bug #26769

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 12:01:31 2024 UTC