|  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
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: spam at pasher dot org
New email:
PHP Version: OS:


 [2004-01-16 12:22 UTC] spam at pasher dot org
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.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2004-01-16 14:07 UTC]
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
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Feb 26 19:01:29 2024 UTC