Bug 106298 - php bad source code
php bad source code
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: php (Show other bugs)
9
All Linux
medium Severity medium
: ---
: ---
Assigned To: Joe Orton
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-10-05 04:50 EDT by d.binderman
Modified: 2007-04-18 12:58 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-01-24 07:02:40 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description d.binderman 2003-10-05 04:50:46 EDT
Description of problem:

Hello there,

I just tried to compile package php-4.2.2-17 from Redhat 9.0
with compiler flag -Wall.

The compiler said

/usr/src/redhat/BUILD/php-4.2.2/ext/imap/php_imap.c:2291: warning: operation on
`outp' may be undefined
/usr/src/redhat/BUILD/php-4.2.2/ext/imap/php_imap.c:2297: warning: operation on
`outp' may be undefined
/usr/src/redhat/BUILD/php-4.2.2/ext/imap/php_imap.c:2401: warning: operation on
`outp' may be undefined
/usr/src/redhat/BUILD/php-4.2.2/ext/imap/php_imap.c:2414: warning: operation on
`outp' may be undefined
/usr/src/redhat/BUILD/php-4.2.2/ext/imap/php_imap.c:2419: warning: operation on
`outp' may be undefined

As an example, consider the first piece of source code

*outp++ |= outp[1] >> 4;

You would be much better off with 

*outp |= outp[1] >> 4;
++outp;





Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
    
Actual results:


Expected results:


Additional info:
Comment 1 Joe Orton 2004-01-24 07:02:40 EST
This is fixed in the current sources for Fedora Core 1, thanks for the
report.

Note You need to log in before you can comment on or make changes to this bug.