[sword-svn] r2014 - trunk/src/utilfuns
dglassey at www.crosswire.org
dglassey at www.crosswire.org
Sat Nov 25 15:05:30 MST 2006
Author: dglassey
Date: 2006-11-25 15:05:30 -0700 (Sat, 25 Nov 2006)
New Revision: 2014
Modified:
trunk/src/utilfuns/swbuf.cpp
Log:
final compiler warning - sword is warning clean on g++ 4.1
this one isn't nice because the type of end - buf depends on the size
of pointers, on this arch it is signed long
afaiu this means this class should never be used for a string longer
than max +ve value of a long
so I just had to cast it for now rather than fixing the class to
guarantee that the 'size' is the same type as (end-buf)
Modified: trunk/src/utilfuns/swbuf.cpp
===================================================================
--- trunk/src/utilfuns/swbuf.cpp 2006-11-25 22:01:04 UTC (rev 2013)
+++ trunk/src/utilfuns/swbuf.cpp 2006-11-25 22:05:30 UTC (rev 2014)
@@ -108,7 +108,7 @@
*/
void SWBuf::setSize(unsigned long len) {
assureSize(len+1);
- if ((end - buf) < len)
+ if ((unsigned)(end - buf) < len)
memset(end, fillByte, len - (end-buf));
end = buf + len;
*end = 0;
More information about the sword-cvs
mailing list