From: Operating system: All PHP version: 5.3SVN-2011-05-24 (SVN) Package: Filter related Bug Type: Bug Bug description:filter/logical_filters.c:685:32: warning: use of logical || with constant op.
Description: ------------ Hi: There is some buggy/supicious code: ./ext/filter/logical_filters.c:685:32: warning: use of logical || with constant operand; switch to bitwise | or remove constant [-Wconstant-logical-operand] if (flags & (FILTER_FLAG_IPV4 || FILTER_FLAG_IPV6)) { ^ ~~~~~~~~~~~~~~~~ Test script: --------------- Attached is a patch to clear the problem separating it in two operations. Expected result: ---------------- No warning Actual result: -------------- ./ext/filter/logical_filters.c:685:32: warning: use of logical || with constant operand; switch to bitwise | or remove constant [-Wconstant-logical-operand] -- Edit bug report at http://bugs.php.net/bug.php?id=54912&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=54912&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=54912&r=trysnapshot53 Try a snapshot (trunk): http://bugs.php.net/fix.php?id=54912&r=trysnapshottrunk Fixed in SVN: http://bugs.php.net/fix.php?id=54912&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=54912&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=54912&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=54912&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=54912&r=needscript Try newer version: http://bugs.php.net/fix.php?id=54912&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=54912&r=support Expected behavior: http://bugs.php.net/fix.php?id=54912&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=54912&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=54912&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=54912&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=54912&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=54912&r=dst IIS Stability: http://bugs.php.net/fix.php?id=54912&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=54912&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=54912&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=54912&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=54912&r=mysqlcfg