diff options
author | Daniel Veillard <veillard@src.gnome.org> | 2005-08-08 20:33:54 +0000 |
---|---|---|
committer | Daniel Veillard <veillard@src.gnome.org> | 2005-08-08 20:33:54 +0000 |
commit | 9e2110bbff362d12466bfa38cde2842b2a6297ff (patch) | |
tree | 9d5426c51be3c68242216aebf0340b3d09c69e3e /xmlschemastypes.c | |
parent | 100e18030d3d1c4e8dbcde56452462de79e98b6a (diff) | |
download | android_external_libxml2-9e2110bbff362d12466bfa38cde2842b2a6297ff.tar.gz android_external_libxml2-9e2110bbff362d12466bfa38cde2842b2a6297ff.tar.bz2 android_external_libxml2-9e2110bbff362d12466bfa38cde2842b2a6297ff.zip |
applied patch from Marcus Boerger to remove warnings on Windows. Daniel
* nanoftp.c nanohttp.c xmlschemastypes.c: applied patch from
Marcus Boerger to remove warnings on Windows.
Daniel
Diffstat (limited to 'xmlschemastypes.c')
-rw-r--r-- | xmlschemastypes.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/xmlschemastypes.c b/xmlschemastypes.c index 3d64a7e3..59a51e0d 100644 --- a/xmlschemastypes.c +++ b/xmlschemastypes.c @@ -2251,7 +2251,7 @@ xmlSchemaValAtomicType(xmlSchemaTypePtr type, const xmlChar * value, unsigned int len, neg = 0; xmlChar cval[25]; xmlChar *cptr = cval; - int dec = -1; + unsigned int dec = ~0u; if (cur == NULL) goto return1; @@ -2284,7 +2284,7 @@ xmlSchemaValAtomicType(xmlSchemaTypePtr type, const xmlChar * value, *cptr++ = *cur++; len++; } else if (*cur == '.') { - if (dec != -1) + if (dec != ~0u) goto return1; /* multiple decimal points */ cur++; if ((*cur == 0) && (cur -1 == value)) @@ -2311,8 +2311,8 @@ xmlSchemaValAtomicType(xmlSchemaTypePtr type, const xmlChar * value, /* * If a mixed decimal, get rid of trailing zeroes */ - if (dec != -1) { - while ((len > dec) && (cptr > cval) &&
+ if (dec != ~0u) { + while ((len > dec) && (cptr > cval) && (*(cptr-1) == '0')) { cptr--; len--; @@ -2334,7 +2334,7 @@ xmlSchemaValAtomicType(xmlSchemaTypePtr type, const xmlChar * value, if (len == 0) len++; v->value.decimal.sign = neg; - if (dec == -1) { + if (dec == ~0u) { v->value.decimal.frac = 0; v->value.decimal.total = len; } else { |