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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: spam at pasher dot org
New email:
PHP Version: OS:

 

 [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: Fri Apr 19 06:01:29 2024 UTC