summaryrefslogtreecommitdiff
path: root/strings
diff options
context:
space:
mode:
authorunknown <georg@lmy002.wdf.sap.corp>2005-06-13 12:41:15 +0200
committerunknown <georg@lmy002.wdf.sap.corp>2005-06-13 12:41:15 +0200
commitba144e2290e100c02d9f4f4648d8ce1cabbdde77 (patch)
tree0a4d130bc8c5eb5d2582f3864b50584de7a5647f /strings
parent871977f26f523a3587c24273e3ebc61ccd26890f (diff)
downloadmariadb-git-ba144e2290e100c02d9f4f4648d8ce1cabbdde77.tar.gz
fixes for windows 64-bit compiler warnings
heap/hp_hash.c: fix for windows 64-bit compiler warnings heap/hp_update.c: fix for windows 64-bit compiler warnings mysys/default.c: fix for windows 64-bit compiler warnings mysys/default_modify.c: fix for windows 64-bit compiler warnings mysys/mf_iocache.c: fix for windows 64-bit compiler warnings mysys/mf_keycache.c: fix for windows 64-bit compiler warnings mysys/my_alloc.c: fix for windows 64-bit compiler warnings mysys/my_getopt.c: fix for windows 64-bit compiler warnings mysys/my_mmap.c: fix for windows 64-bit compiler warnings mysys/my_once.c: fix for windows 64-bit compiler warnings mysys/string.c: fix for windows 64-bit compiler warnings sql-common/client.c: fix for windows 64-bit compiler warnings sql/field.cc: fix for windows 64-bit compiler warnings sql/gstream.cc: fix for windows 64-bit compiler warnings sql/ha_myisam.cc: fix for windows 64-bit compiler warnings sql/ha_myisammrg.cc: fix for windows 64-bit compiler warnings sql/item.cc: fix for windows 64-bit compiler warnings sql/item.h: fix for windows 64-bit compiler warnings sql/item_cmpfunc.cc: fix for windows 64-bit compiler warnings sql/password.c: fix for windows 64-bit compiler warnings sql/set_var.h: fix for windows 64-bit compiler warnings strings/ctype-big5.c: fix for windows 64-bit compiler warnings strings/ctype-bin.c: fix for windows 64-bit compiler warnings strings/ctype-cp932.c: fix for windows 64-bit compiler warnings strings/ctype-eucjpms.c: fix for windows 64-bit compiler warnings strings/ctype-mb.c: fix for windows 64-bit compiler warnings strings/ctype-simple.c: fix for windows 64-bit compiler warnings strings/ctype-sjis.c: fix for windows 64-bit compiler warnings strings/ctype-uca.c: fix for windows 64-bit compiler warnings strings/ctype-ucs2.c: fix for windows 64-bit compiler warnings strings/ctype-ujis.c: fix for windows 64-bit compiler warnings strings/ctype-utf8.c: fix for windows 64-bit compiler warnings strings/ctype.c: fix for windows 64-bit compiler warnings strings/decimal.c: fix for windows 64-bit compiler warnings strings/xml.c: fix for windows 64-bit compiler warnings
Diffstat (limited to 'strings')
-rw-r--r--strings/ctype-big5.c2
-rw-r--r--strings/ctype-bin.c2
-rw-r--r--strings/ctype-cp932.c2
-rw-r--r--strings/ctype-eucjpms.c10
-rw-r--r--strings/ctype-mb.c6
-rw-r--r--strings/ctype-simple.c10
-rw-r--r--strings/ctype-sjis.c2
-rw-r--r--strings/ctype-uca.c4
-rw-r--r--strings/ctype-ucs2.c18
-rw-r--r--strings/ctype-ujis.c10
-rw-r--r--strings/ctype-utf8.c16
-rw-r--r--strings/ctype.c2
-rw-r--r--strings/decimal.c24
-rw-r--r--strings/xml.c24
14 files changed, 66 insertions, 66 deletions
diff --git a/strings/ctype-big5.c b/strings/ctype-big5.c
index a4040ed2b90..01ecd63d52b 100644
--- a/strings/ctype-big5.c
+++ b/strings/ctype-big5.c
@@ -6320,7 +6320,7 @@ uint my_well_formed_len_big5(CHARSET_INFO *cs __attribute__((unused)),
break;
}
}
- return b - b0;
+ return (uint) (b - b0);
}
diff --git a/strings/ctype-bin.c b/strings/ctype-bin.c
index 13105df9334..40ecbc33d61 100644
--- a/strings/ctype-bin.c
+++ b/strings/ctype-bin.c
@@ -433,7 +433,7 @@ skip:
if (nmatch > 0)
{
match[0].beg= 0;
- match[0].end= str- (const uchar*)b-1;
+ match[0].end= (uint) (str- (const uchar*)b-1);
match[0].mblen= match[0].end;
if (nmatch > 1)
diff --git a/strings/ctype-cp932.c b/strings/ctype-cp932.c
index fd2b0fd8e21..f62cf2db599 100644
--- a/strings/ctype-cp932.c
+++ b/strings/ctype-cp932.c
@@ -5446,7 +5446,7 @@ uint my_well_formed_len_cp932(CHARSET_INFO *cs __attribute__((unused)),
break;
}
}
- return b - b0;
+ return (uint) (b - b0);
}
diff --git a/strings/ctype-eucjpms.c b/strings/ctype-eucjpms.c
index 784293918ed..58caac15256 100644
--- a/strings/ctype-eucjpms.c
+++ b/strings/ctype-eucjpms.c
@@ -8403,14 +8403,14 @@ uint my_well_formed_len_eucjpms(CHARSET_INFO *cs __attribute__((unused)),
chbeg= (char *) b++;
if (b >= (uchar *) end) /* need more bytes */
- return chbeg - beg; /* unexpected EOL */
+ return (uint) (chbeg - beg); /* unexpected EOL */
if (ch == 0x8E) /* [x8E][xA0-xDF] */
{
if (*b >= 0xA0 && *b <= 0xDF)
continue;
*error=1;
- return chbeg - beg; /* invalid sequence */
+ return (uint) (chbeg - beg); /* invalid sequence */
}
if (ch == 0x8F) /* [x8F][xA1-xFE][xA1-xFE] */
@@ -8419,7 +8419,7 @@ uint my_well_formed_len_eucjpms(CHARSET_INFO *cs __attribute__((unused)),
if (b >= (uchar*) end)
{
*error= 1;
- return chbeg - beg; /* unexpected EOL */
+ return (uint)(chbeg - beg); /* unexpected EOL */
}
}
@@ -8427,9 +8427,9 @@ uint my_well_formed_len_eucjpms(CHARSET_INFO *cs __attribute__((unused)),
*b >= 0xA1 && *b <= 0xFE) /* [xA1-xFE][xA1-xFE] */
continue;
*error=1;
- return chbeg - beg; /* invalid sequence */
+ return (uint) (chbeg - beg); /* invalid sequence */
}
- return b - (uchar *) beg;
+ return (uint) (b - (uchar *) beg);
}
diff --git a/strings/ctype-mb.c b/strings/ctype-mb.c
index 2d9f8b16bfc..6f171c03845 100644
--- a/strings/ctype-mb.c
+++ b/strings/ctype-mb.c
@@ -268,7 +268,7 @@ uint my_charpos_mb(CHARSET_INFO *cs __attribute__((unused)),
pos+= (mblen= my_ismbchar(cs, pos, end)) ? mblen : 1;
length--;
}
- return length ? end+2-start : pos-start;
+ return (uint) (length ? end+2-start : pos-start);
}
@@ -290,7 +290,7 @@ uint my_well_formed_len_mb(CHARSET_INFO *cs, const char *b, const char *e,
b+= mblen;
pos--;
}
- return b - b_start;
+ return (uint) (b - b_start);
}
@@ -329,7 +329,7 @@ uint my_instr_mb(CHARSET_INFO *cs,
if (nmatch)
{
match[0].beg= 0;
- match[0].end= b-b0;
+ match[0].end= (uint) (b-b0);
match[0].mblen= res;
if (nmatch > 1)
{
diff --git a/strings/ctype-simple.c b/strings/ctype-simple.c
index 6ed1af846ec..fe514186deb 100644
--- a/strings/ctype-simple.c
+++ b/strings/ctype-simple.c
@@ -1084,7 +1084,7 @@ ulong my_scan_8bit(CHARSET_INFO *cs, const char *str, const char *end, int sq)
if (*str == '.')
{
for(str++ ; str != end && *str == '0' ; str++);
- return str-str0;
+ return (ulong) (str-str0);
}
return 0;
@@ -1094,7 +1094,7 @@ ulong my_scan_8bit(CHARSET_INFO *cs, const char *str, const char *end, int sq)
if (!my_isspace(cs,*str))
break;
}
- return str-str0;
+ return (ulong) (str-str0);
default:
return 0;
}
@@ -1111,14 +1111,14 @@ void my_fill_8bit(CHARSET_INFO *cs __attribute__((unused)),
uint my_numchars_8bit(CHARSET_INFO *cs __attribute__((unused)),
const char *b, const char *e)
{
- return e-b;
+ return (uint) (e-b);
}
uint my_numcells_8bit(CHARSET_INFO *cs __attribute__((unused)),
const char *b, const char *e)
{
- return e-b;
+ return (uint) (e-b);
}
@@ -1193,7 +1193,7 @@ skip:
if (nmatch > 0)
{
match[0].beg= 0;
- match[0].end= str- (const uchar*)b-1;
+ match[0].end= (uint) (str- (const uchar*)b-1);
match[0].mblen= match[0].end;
if (nmatch > 1)
diff --git a/strings/ctype-sjis.c b/strings/ctype-sjis.c
index 9cd5d6d7981..161f75ca936 100644
--- a/strings/ctype-sjis.c
+++ b/strings/ctype-sjis.c
@@ -4615,7 +4615,7 @@ uint my_well_formed_len_sjis(CHARSET_INFO *cs __attribute__((unused)),
break;
}
}
- return b - b0;
+ return (uint) (b - b0);
}
diff --git a/strings/ctype-uca.c b/strings/ctype-uca.c
index eb207c9821f..8bc48b3609d 100644
--- a/strings/ctype-uca.c
+++ b/strings/ctype-uca.c
@@ -7527,7 +7527,7 @@ static void my_coll_lexem_print_error(MY_COLL_LEXEM *lexem,
{
char tail[30];
size_t len= lexem->end - lexem->prev;
- strmake (tail, lexem->prev, min(len, sizeof(tail)-1));
+ strmake (tail, lexem->prev, (uint) min(len, sizeof(tail)-1));
errstr[errsize-1]= '\0';
my_snprintf(errstr,errsize-1,"%s at '%s'", txt, tail);
}
@@ -7769,7 +7769,7 @@ static int my_coll_rule_parse(MY_COLL_RULE *rule, size_t mitems,
continue;
}
}
- return (size_t) nitems;
+ return (int) nitems;
}
#define MY_MAX_COLL_RULE 128
diff --git a/strings/ctype-ucs2.c b/strings/ctype-ucs2.c
index 4acd75d7a6f..5844a6e688b 100644
--- a/strings/ctype-ucs2.c
+++ b/strings/ctype-ucs2.c
@@ -229,7 +229,7 @@ static int my_strnncoll_ucs2(CHARSET_INFO *cs,
s+=s_res;
t+=t_res;
}
- return t_is_prefix ? t-te : ((se-s) - (te-t));
+ return (int) (t_is_prefix ? t-te : ((se-s) - (te-t)));
}
/*
@@ -344,14 +344,14 @@ static int my_strncasecmp_ucs2(CHARSET_INFO *cs,
s+=s_res;
t+=t_res;
}
- return ( (se-s) - (te-t) );
+ return (int) ( (se-s) - (te-t) );
}
static int my_strcasecmp_ucs2(CHARSET_INFO *cs, const char *s, const char *t)
{
- uint s_len=strlen(s);
- uint t_len=strlen(t);
+ uint s_len= (uint) strlen(s);
+ uint t_len= (uint) strlen(t);
uint len = (s_len > t_len) ? s_len : t_len;
return my_strncasecmp_ucs2(cs, s, t, len);
}
@@ -386,7 +386,7 @@ static int my_strnxfrm_ucs2(CHARSET_INFO *cs,
dst+=res;
}
if (dst < de)
- cs->cset->fill(cs, (char*) dst, de - dst, ' ');
+ cs->cset->fill(cs, (char*) dst, (uint) (de - dst), ' ');
return dstlen;
}
@@ -1370,7 +1370,7 @@ int my_strnncoll_ucs2_bin(CHARSET_INFO *cs,
s+=s_res;
t+=t_res;
}
- return t_is_prefix ? t-te : ((se-s) - (te-t));
+ return (int) (t_is_prefix ? t-te : ((se-s) - (te-t)));
}
static int my_strnncollsp_ucs2_bin(CHARSET_INFO *cs,
@@ -1387,8 +1387,8 @@ static int my_strnncollsp_ucs2_bin(CHARSET_INFO *cs,
static
int my_strcasecmp_ucs2_bin(CHARSET_INFO *cs, const char *s, const char *t)
{
- uint s_len=strlen(s);
- uint t_len=strlen(t);
+ uint s_len= (uint) strlen(s);
+ uint t_len= (uint) strlen(t);
uint len = (s_len > t_len) ? s_len : t_len;
return my_strncasecmp_ucs2(cs, s, t, len);
}
@@ -1525,7 +1525,7 @@ ulong my_scan_ucs2(CHARSET_INFO *cs __attribute__((unused)),
if (str[0] != '\0' || str[1] != ' ')
break;
}
- return str - str0;
+ return (ulong) (str - str0);
default:
return 0;
}
diff --git a/strings/ctype-ujis.c b/strings/ctype-ujis.c
index 6b704980d0d..3f934ebd9ce 100644
--- a/strings/ctype-ujis.c
+++ b/strings/ctype-ujis.c
@@ -8270,7 +8270,7 @@ uint my_well_formed_len_ujis(CHARSET_INFO *cs __attribute__((unused)),
if (b >= (uchar *) end) /* need more bytes */
{
*error= 1;
- return chbeg - beg; /* unexpected EOL */
+ return (uint) (chbeg - beg); /* unexpected EOL */
}
if (ch == 0x8E) /* [x8E][xA0-xDF] */
@@ -8278,7 +8278,7 @@ uint my_well_formed_len_ujis(CHARSET_INFO *cs __attribute__((unused)),
if (*b >= 0xA0 && *b <= 0xDF)
continue;
*error= 1;
- return chbeg - beg; /* invalid sequence */
+ return (uint) (chbeg - beg); /* invalid sequence */
}
if (ch == 0x8F) /* [x8F][xA1-xFE][xA1-xFE] */
@@ -8287,7 +8287,7 @@ uint my_well_formed_len_ujis(CHARSET_INFO *cs __attribute__((unused)),
if (b >= (uchar*) end)
{
*error= 1;
- return chbeg - beg; /* unexpected EOL */
+ return (uint) (chbeg - beg); /* unexpected EOL */
}
}
@@ -8295,9 +8295,9 @@ uint my_well_formed_len_ujis(CHARSET_INFO *cs __attribute__((unused)),
*b >= 0xA1 && *b <= 0xFE) /* [xA1-xFE][xA1-xFE] */
continue;
*error= 1;
- return chbeg - beg; /* invalid sequence */
+ return (uint) (chbeg - beg); /* invalid sequence */
}
- return b - (uchar *) beg;
+ return (uint) (b - (uchar *) beg);
}
diff --git a/strings/ctype-utf8.c b/strings/ctype-utf8.c
index 6f6d24d8643..53197972dab 100644
--- a/strings/ctype-utf8.c
+++ b/strings/ctype-utf8.c
@@ -1932,7 +1932,7 @@ static uchar to_upper_utf8[] = {
static inline int bincmp(const uchar *s, const uchar *se,
const uchar *t, const uchar *te)
{
- int slen=se-s, tlen=te-t;
+ int slen= (int) (se-s), tlen= (int) (te-t);
int len=min(slen,tlen);
int cmp= memcmp(s,t,len);
return cmp ? cmp : slen-tlen;
@@ -2108,7 +2108,7 @@ static uint my_caseup_utf8(CHARSET_INFO *cs, char *src, uint srclen,
src+= srcres;
dst+= dstres;
}
- return dst - dst0;
+ return (uint) (dst - dst0);
}
static void my_hash_sort_utf8(CHARSET_INFO *cs, const uchar *s, uint slen,
@@ -2141,7 +2141,7 @@ static void my_hash_sort_utf8(CHARSET_INFO *cs, const uchar *s, uint slen,
static void my_caseup_str_utf8(CHARSET_INFO * cs, char * s)
{
- uint len= strlen(s);
+ uint len= (uint) strlen(s);
my_caseup_utf8(cs, s, len, s, len);
}
@@ -2165,12 +2165,12 @@ static uint my_casedn_utf8(CHARSET_INFO *cs, char *src, uint srclen,
src+= srcres;
dst+= dstres;
}
- return dst - dst0;
+ return (uint) (dst - dst0);
}
static void my_casedn_str_utf8(CHARSET_INFO *cs, char * s)
{
- uint len= strlen(s);
+ uint len= (uint) strlen(s);
my_casedn_utf8(cs, s, len, s, len);
}
@@ -2210,7 +2210,7 @@ static int my_strnncoll_utf8(CHARSET_INFO *cs,
s+=s_res;
t+=t_res;
}
- return t_is_prefix ? t-te : ((se-s) - (te-t));
+ return (int) (t_is_prefix ? t-te : ((se-s) - (te-t)));
}
@@ -2284,8 +2284,8 @@ static int my_strnncollsp_utf8(CHARSET_INFO *cs,
t+=t_res;
}
- slen= se-s;
- tlen= te-t;
+ slen= (uint) (se-s);
+ tlen= (uint) (te-t);
res= 0;
if (slen != tlen)
diff --git a/strings/ctype.c b/strings/ctype.c
index 4454d3c45e1..ba6dbaeb887 100644
--- a/strings/ctype.c
+++ b/strings/ctype.c
@@ -216,7 +216,7 @@ static int cs_value(MY_XML_PARSER *st,const char *attr, uint len)
{
struct my_cs_file_info *i= (struct my_cs_file_info *)st->user_data;
struct my_cs_file_section_st *s;
- int state= (s=cs_file_sec(st->attr,strlen(st->attr))) ? s->state : 0;
+ int state= (int)((s=cs_file_sec(st->attr, (int) strlen(st->attr))) ? s->state : 0);
#ifndef DBUG_OFF
if(0){
diff --git a/strings/decimal.c b/strings/decimal.c
index 4a487f3c9b0..8d07a84ede1 100644
--- a/strings/decimal.c
+++ b/strings/decimal.c
@@ -472,7 +472,7 @@ static void digits_bounds(decimal_t *from, int *start_result, int *end_result)
else
{
i= DIG_PER_DEC1 - 1;
- start= (buf_beg - from->buf) * DIG_PER_DEC1;
+ start= (int) ((buf_beg - from->buf) * DIG_PER_DEC1);
}
if (buf_beg < end)
for (; *buf_beg < powers10[i--]; start++) ;
@@ -484,13 +484,13 @@ static void digits_bounds(decimal_t *from, int *start_result, int *end_result)
/* find non-zero decimal digit from the end */
if (buf_end == end - 1 && from->frac)
{
- stop= ((buf_end - from->buf) * DIG_PER_DEC1 +
- (i= ((from->frac - 1) % DIG_PER_DEC1 + 1)));
+ stop= (int) (((buf_end - from->buf) * DIG_PER_DEC1 +
+ (i= ((from->frac - 1) % DIG_PER_DEC1 + 1))));
i= DIG_PER_DEC1 - i + 1;
}
else
{
- stop= (buf_end - from->buf + 1) * DIG_PER_DEC1;
+ stop= (int) ((buf_end - from->buf + 1) * DIG_PER_DEC1);
i= 1;
}
for (; *buf_end % powers10[i++] == 0; stop--);
@@ -794,13 +794,13 @@ internal_str2dec(const char *from, decimal_t *to, char **end, my_bool fixed)
s1=s;
while (s < end_of_string && my_isdigit(&my_charset_latin1, *s))
s++;
- intg=s-s1;
+ intg= (int) (s-s1);
if (s < end_of_string && *s=='.')
{
endp= s+1;
while (endp < end_of_string && my_isdigit(&my_charset_latin1, *endp))
endp++;
- frac= endp - s - 1;
+ frac= (int) (endp - s - 1);
}
else
{
@@ -1715,14 +1715,14 @@ static int do_sub(decimal_t *from1, decimal_t *from2, decimal_t *to)
while (buf1 < stop1 && *buf1 == 0)
buf1++;
start1=buf1;
- intg1=stop1-buf1;
+ intg1= (int) (stop1-buf1);
}
if (unlikely(*buf2 == 0))
{
while (buf2 < stop2 && *buf2 == 0)
buf2++;
start2=buf2;
- intg2=stop2-buf2;
+ intg2= (int) (stop2-buf2);
}
if (intg2 > intg1)
carry=1;
@@ -1734,8 +1734,8 @@ static int do_sub(decimal_t *from1, decimal_t *from2, decimal_t *to)
end1--;
while (unlikely((buf2 <= end2) && (*end2 == 0)))
end2--;
- frac1= (end1 - stop1) + 1;
- frac2= (end2 - stop2) + 1;
+ frac1= (int) (end1 - stop1) + 1;
+ frac2= (int) (end2 - stop2) + 1;
while (buf1 <=end1 && buf2 <= end2 && *buf1 == *buf2)
buf1++, buf2++;
if (buf1 <= end1)
@@ -2086,7 +2086,7 @@ static int do_div_mod(decimal_t *from1, decimal_t *from2,
/* removing end zeroes */
while (*stop2 == 0 && stop2 >= start2)
stop2--;
- len2= stop2++ - start2;
+ len2= (int) (stop2++ - start2);
/*
calculating norm2 (normalized *start2) - we need *start2 to be large
@@ -2173,7 +2173,7 @@ static int do_div_mod(decimal_t *from1, decimal_t *from2,
if (dcarry)
*--start1=dcarry;
buf0=to->buf;
- intg0=ROUND_UP(prec1-frac1)-(start1-tmp1);
+ intg0=(int) (ROUND_UP(prec1-frac1)-(start1-tmp1));
frac0=ROUND_UP(to->frac);
error=E_DEC_OK;
if (unlikely(frac0==0 && intg0==0))
diff --git a/strings/xml.c b/strings/xml.c
index d19c3dab241..17f1b400957 100644
--- a/strings/xml.c
+++ b/strings/xml.c
@@ -148,7 +148,7 @@ static int my_xml_enter(MY_XML_PARSER *st, const char *str, uint len)
memcpy(st->attrend,str,len);
st->attrend+=len;
st->attrend[0]='\0';
- return st->enter ? st->enter(st,st->attr,st->attrend-st->attr) : MY_XML_OK;
+ return st->enter ? st->enter(st,st->attr,st->attrend-st->attr) : MY_XML_OK;
}
@@ -170,7 +170,7 @@ static int my_xml_leave(MY_XML_PARSER *p, const char *str, uint slen)
/* Find previous '.' or beginning */
for( e=p->attrend; (e>p->attr) && (e[0]!='.') ; e--);
- glen = (e[0]=='.') ? (p->attrend-e-1) : p->attrend-e;
+ glen = (uint) ((e[0]=='.') ? (p->attrend-e-1) : p->attrend-e);
if (str && (slen != glen))
{
@@ -180,7 +180,7 @@ static int my_xml_leave(MY_XML_PARSER *p, const char *str, uint slen)
return MY_XML_ERROR;
}
- rc = p->leave_xml ? p->leave_xml(p,p->attr,p->attrend-p->attr) : MY_XML_OK;
+ rc = p->leave_xml ? p->leave_xml(p,p->attr,p->attrend-p->attr) : MY_XML_OK;
*e='\0';
p->attrend=e;
@@ -221,7 +221,7 @@ int my_xml_parse(MY_XML_PARSER *p,const char *str, uint len)
sprintf(p->errstr,"1: %s unexpected (ident wanted)",lex2str(lex));
return MY_XML_ERROR;
}
- if(MY_XML_OK!=my_xml_leave(p,a.beg,a.end-a.beg))
+ if(MY_XML_OK!=my_xml_leave(p,a.beg,(uint) (a.end-a.beg)))
return MY_XML_ERROR;
lex=my_xml_scan(p,&a);
goto gt;
@@ -240,7 +240,7 @@ int my_xml_parse(MY_XML_PARSER *p,const char *str, uint len)
if (MY_XML_IDENT==lex)
{
- if(MY_XML_OK!=my_xml_enter(p,a.beg,a.end-a.beg))
+ if(MY_XML_OK!=my_xml_enter(p,a.beg,(uint) (a.end-a.beg)))
return MY_XML_ERROR;
}
else
@@ -258,9 +258,9 @@ int my_xml_parse(MY_XML_PARSER *p,const char *str, uint len)
lex=my_xml_scan(p,&b);
if ( (lex==MY_XML_IDENT) || (lex==MY_XML_STRING) )
{
- if((MY_XML_OK!=my_xml_enter(p,a.beg,a.end-a.beg)) ||
- (MY_XML_OK!=my_xml_value(p,b.beg,b.end-b.beg)) ||
- (MY_XML_OK!=my_xml_leave(p,a.beg,a.end-a.beg)))
+ if((MY_XML_OK!=my_xml_enter(p,a.beg,(uint) (a.end-a.beg))) ||
+ (MY_XML_OK!=my_xml_value(p,b.beg,(uint) (b.end-b.beg))) ||
+ (MY_XML_OK!=my_xml_leave(p,a.beg,(uint) (a.end-a.beg))))
return MY_XML_ERROR;
}
else
@@ -272,8 +272,8 @@ int my_xml_parse(MY_XML_PARSER *p,const char *str, uint len)
}
else if ( (MY_XML_STRING==lex) || (MY_XML_IDENT==lex) )
{
- if((MY_XML_OK!=my_xml_enter(p,a.beg,a.end-a.beg)) ||
- (MY_XML_OK!=my_xml_leave(p,a.beg,a.end-a.beg)))
+ if((MY_XML_OK!=my_xml_enter(p,a.beg,(uint) (a.end-a.beg))) ||
+ (MY_XML_OK!=my_xml_leave(p,a.beg,(uint) (a.end-a.beg))))
return MY_XML_ERROR;
}
else
@@ -321,7 +321,7 @@ gt:
my_xml_norm_text(&a);
if (a.beg!=a.end)
{
- my_xml_value(p,a.beg,a.end-a.beg);
+ my_xml_value(p,a.beg,(uint) (a.end-a.beg));
}
}
}
@@ -384,7 +384,7 @@ uint my_xml_error_pos(MY_XML_PARSER *p)
if (s[0]=='\n')
beg=s;
}
- return p->cur-beg;
+ return (uint) (p->cur-beg);
}
uint my_xml_error_lineno(MY_XML_PARSER *p)