php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #26937 Warning in xml.c
Submitted: 2004-01-16 12:22 UTC Modified: 2004-01-16 14:07 UTC
From: spam at pasher dot org Assigned:
Status: Closed Package: Compile Warning
PHP Version: 4.3.5RC1 OS: Debian Linux 2.4.20
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
28 - 18 = ?
Subscribe to this entry?

 
 [2004-01-16 12:22 UTC] spam at pasher dot org
Description:
------------
When compiling PHP (even as of 4.3.5RC1), it outputs the following warning:
/php-4.3.5RC1/ext/xml/xml.c: In function `xml_utf8_encode': 
/php-4.3.5RC1/ext/xml/xml.c:489: warning: comparison is always true due to limited range of data type 
/php-4.3.5RC1/ext/xml/xml.c:493: warning: comparison is always true due to limited range of data type

It looks like the variable in question (c) is declared as unsigned short. It is later being compared to 0x10000 and 0x200000, which is two large for a short.

I would assume an unsigned int would be enough.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-01-16 14:07 UTC] sniper@php.net
This bug has been fixed in CVS.

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.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 04:01:30 2024 UTC