freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Devel] A subtle warning while recompiling ftcglyph.c in the cache subdi


From: Tom Kelly
Subject: [Devel] A subtle warning while recompiling ftcglyph.c in the cache subdirectory.
Date: Wed, 29 Sep 2004 13:33:59 -0400
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)

I get a warning on line 50 in ftcglyph.c in the cache subdirectory. The warning is is that the code is testing if an unsigned integer is ever less than zero which by definition it never can be. This could be a problem if when it hits that line the unsigned int is = -1 which is MAXINT. Is it OK if I change the datatype to a signed int. When you decrement a variable in a variety of places it is very easy for it to get below zero when you expect it to be zero when you do the <= 0 test on line 50. What is the range of num_nodes? Is a signed integer just as good as an unsigned integer? Tom Kelly.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]