Bug #54912 [Opn->Csd]: filter/logical_filters.c:685:32: warning: use of logical || with constant op.
| From: | felipe@php.net | Date: | Tue, 24 May 2011 22:24:27 +0000 |
| Subject: | Bug #54912 [Opn->Csd]: filter/logical_filters.c:685:32: warning: use of logical || with constant op. | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-160942@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=54912&edit=1
ID: 54912
Updated by: felipe@php.net
Reported by: crrodriguez at opensuse dot org
Summary: filter/logical_filters.c:685:32: warning: use of
logical || with constant op.
-Status: Open
+Status: Closed
Type: Bug
Package: Filter related
Operating System: All
PHP Version: 5.3SVN-2011-05-24 (SVN)
-Assigned To:
+Assigned To: felipe
Block user comment: N
Private report: N
New Comment:
This bug has been fixed in SVN.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2011-05-25 00:24:08] felipe@php.net
Automatic comment from SVN on behalf of felipe
Revision: http://svn.php.net/viewvc/?view=revision&revision=311402
Log: - Fixed bug #54912 (filter/logical_filters.c:685:32: warning: use
of logical || with constant op)
Initial patch by: crrodriguez at opensuse dot org
------------------------------------------------------------------------
[2011-05-24 05:30:56] crrodriguez at opensuse dot org
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 this bug report at http://bugs.php.net/bug.php?id=54912&edit=1