Closed
Description
Description
I just compiled php-8.1.4 with the new compiler clang-14. It said:
php-8.1.4/sapi/phpdbg/phpdbg.c:861:7: warning: use of bitwise '|' with boolean operands
[-Wbitwise-instead-of-logical]
php-8.1.4/sapi/phpdbg/phpdbg.c:861:8: warning: use of bitwise '&' with boolean operands
[-Wbitwise-instead-of-logical]
Source code is
if (((fstat(fileno(stderr), &stat[2]) < 0) & (fstat(fileno(stdout), &stat[0]) < 0)) | (fstat(data->fd, &stat[1]) < 0)) {
Maybe better code:
if (((fstat(fileno(stderr), &stat[2]) < 0) && (fstat(fileno(stdout), &stat[0]) < 0)) || (fstat(data->fd, &stat[1]) < 0)) {
PHP Version
pgp 8.1.4
Operating System
Linux fedora 36 beta