当我构建php 7.0.1时,出现了一些警告,希望在新版本中能得到修复,但今天在7.0.2中又出现了更多的警告。
PHP
php_date.c
文件生成了6个警告。
/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.
interval.c
生成的1个警告
/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.
并且pthreads生成了一个警告
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
Apache
./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。
你认为问题是什么?我该如何修复这些警告?