當我建立php 7.0.1時,我有一些警告,我希望這可以在新版本的php中修復,但是今天我有7.0.2的更多警告。PHP7和Apache編譯警告
PHP 通過php_date.c
文件由
interval.c
/Users/javidgajievi/Ovlee/php/ext/date/lib/interval.c:73:13: warning: using integer absolute value function 'abs' when argument is of
floating point type [-Wabsolute-value]
rt->days = abs(floor((one->sse - two->sse - (dst_h_corr * 3600) - (dst_m_corr * 60))/86400));
^
/Users/javidgajievi/Ovlee/php/ext/date/lib/interval.c:73:13: note: use function 'fabs' instead
rt->days = abs(floor((one->sse - two->sse - (dst_h_corr * 3600) - (dst_m_corr * 60))/86400));
^~~
fabs
1 warning generated.
和1警告生成
/Users/username/folder/php/ext/date/php_date.c:2196:6: warning: absolute value function 'abs' given an argument of type 'long long' but has parameter of type 'int' which may cause truncation of value [-Wabsolute-value] abs(utc_offset/60),
^
/Users/username/folder/php/ext/date/php_date.c:2196:6: note: use function 'llabs' instead abs(utc_offset/60), ^~~ llabs
6 warnings generated.
1警告生成
6警告被並行線程生成
ext/pthreads/src/object.h:41:1: warning: '/*' within block comment [-Wcomment]
/* {{{ */
^
Apache
Apache產生了更多的警告,所以我只列出其中的一小部分來給你一個關於警告的想法。
mod_authnz_ldap.c:554:50: warning: 'ldap_err2string' is deprecated: first deprecated in OS X 10.11 - use OpenDirectory Framework
[-Wdeprecated-declarations]
user, r->uri, ldc->reason, ldap_err2string(result));
^
/Users/username/folder/apache/include/http_log.h:448:44: note: expanded from macro 'ap_log_rerror'
#define ap_log_rerror(...) ap_log_rerror__(__VA_ARGS__)
^
/Users/username/ovlee/apache/include/http_log.h:451:63: note: expanded from macro 'ap_log_rerror__'
ap_log_rerror_(file, line, mi, level, status, r, __VA_ARGS__); \
我的構建配置
PHP
./configure \
--prefix=/Users/username/fodler/php \
--exec-prefix=/Users/username/folder/php \
--with-apxs2=/Users/username/folder/apache/bin/apxs \
--with-config-file-scan-dir=/Users/username/folder/php/lib \
--with-config-file-path=/Users/username/folder/php/lib \
--disable-all \
--enable-maintainer-zts \
--enable-pthreads
阿帕奇
./configure \
--prefix=/Users/username/fodler/apache \
--exec-prefix=/Users/username/folder/apache \
--with-pcre=/Users/username/folder/apache/pcre \
--enable-module=so \
--with-mpm=worker
所以我不打算列出所有的警告,因爲我認爲這個問題可以從我的環境會導致它是Mac OSX 10.11.2,xCode 7.2,PHP 7.0.2,APAHCE(Httpd)2.4.18
你認爲問題是什麼?我如何解決這個警告?
還有一些問題嗎? –
顯然問題是,我該如何解決這個警告? –
你想改變/修復代碼(並可能返回到PHP源代碼庫)? – VolkerK