php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #47536 Build warnings with embedded SAPI
Submitted: 2009-03-01 16:46 UTC Modified: 2009-05-01 21:48 UTC
From: ikickdogsforfun at hotmail dot com Assigned:
Status: Closed Package: Compile Warning
PHP Version: 5.2.9 OS: Gentoo
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
30 + 45 = ?
Subscribe to this entry?

 
 [2009-03-01 16:46 UTC] ikickdogsforfun at hotmail dot com
Description:
------------
When compiling a C program that makes use of the embedded SAPI (embed.h), there are a few compile warnings that would be nice if they could be fixed :) Also, this is a manually compiled version of PHP, not emerged from Gentoo's portage.

Reproduce code:
---------------
Compiled using the following:
gcc -I/usr/lib/php5/include/php/ 
    -I/usr/lib/php5/include/php/main
    -I/usr/lib/php5/include/php/Zend
    -I/usr/lib/php5/include/php/TSRM
    -I/usr/lib/php5/include/php/sapi/embed
    -L/home/crisp/php/local/lib
    -Wall -Wextra -lpthread -ggdb -o httpd *.c /home/crisp/php/local/lib/libphp5.so

The code itself is here:
http://crispycrisp.org/test.txt

Expected result:
----------------
No compile warnings

Actual result:
--------------
In file included from /usr/lib/php5/include/php/Zend/zend.h:664,
                 from /usr/lib/php5/include/php/main/php.h:34,
                 from /usr/lib/php5/include/php/sapi/embed/php_embed.h:23,
                 from test.c:1:
/usr/lib/php5/include/php/Zend/zend_variables.h:30: warning: unused parameter '__zend_filename'
/usr/lib/php5/include/php/Zend/zend_variables.h:30: warning: unused parameter '__zend_lineno'
/usr/lib/php5/include/php/Zend/zend_variables.h:40: warning: unused parameter '__zend_filename'
/usr/lib/php5/include/php/Zend/zend_variables.h:40: warning: unused parameter '__zend_lineno'
In file included from /usr/lib/php5/include/php/Zend/zend_API.h:30,
                 from /usr/lib/php5/include/php/main/php.h:38,
                 from /usr/lib/php5/include/php/sapi/embed/php_embed.h:23,
                 from test.c:1:
/usr/lib/php5/include/php/Zend/zend_execute.h:65: warning: unused parameter '__zend_orig_filename'
/usr/lib/php5/include/php/Zend/zend_execute.h:65: warning: unused parameter '__zend_orig_lineno'


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-05-01 21:48 UTC] jani@php.net
These warnings happen only when the embed lib is build with --enable-
debug. I fixed most in CVS. The rest are harmless anyway and only needed 
for debugging.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 11:01:29 2024 UTC