Bug#29125 Windows Server X64: so many compiler warnings

- Remove bothersome warning messages.  This change focuses on the warnings 
that are covered by the ignore file: support-files/compiler_warnings.supp.
- Strings are guaranteed to be max uint in length
This commit is contained in:
Ignacio Galarza 2009-02-10 17:47:54 -05:00
commit 2b85c64d65
108 changed files with 786 additions and 751 deletions

View file

@ -37,7 +37,7 @@ uint my_caseup_str_mb(CHARSET_INFO * cs, char *str)
str++;
}
}
return str - str_orig;
return (uint) (str - str_orig);
}
uint my_casedn_str_mb(CHARSET_INFO * cs, char *str)
@ -57,7 +57,7 @@ uint my_casedn_str_mb(CHARSET_INFO * cs, char *str)
str++;
}
}
return str - str_orig;
return (uint) (str - str_orig);
}
uint my_caseup_mb(CHARSET_INFO * cs, char *src, uint srclen,

View file

@ -193,7 +193,7 @@ uint my_caseup_str_8bit(CHARSET_INFO * cs,char *str)
char *str_orig= str;
while ((*str= (char) map[(uchar) *str]) != 0)
str++;
return str - str_orig;
return (uint) (str - str_orig);
}
@ -203,7 +203,7 @@ uint my_casedn_str_8bit(CHARSET_INFO * cs,char *str)
char *str_orig= str;
while ((*str= (char) map[(uchar) *str]) != 0)
str++;
return str - str_orig;
return (uint) (str - str_orig);
}
@ -1516,7 +1516,7 @@ my_strntoull10rnd_8bit(CHARSET_INFO *cs __attribute__((unused)),
}
}
digits= str - beg;
digits= (int) (str - beg);
/* Continue to accumulate into ulonglong */
for (dot= NULL, ull= ul; str < end; str++)
@ -1553,7 +1553,7 @@ my_strntoull10rnd_8bit(CHARSET_INFO *cs __attribute__((unused)),
}
else
{
shift= dot - str;
shift= (int) (dot - str);
for ( ; str < end && (ch= (unsigned char) (*str - '0')) < 10; str++);
}
goto exp;
@ -1577,7 +1577,7 @@ my_strntoull10rnd_8bit(CHARSET_INFO *cs __attribute__((unused)),
/* Unknown character, exit the loop */
break;
}
shift= dot ? dot - str : 0; /* Right shift */
shift= dot ? (int) (dot - str) : 0; /* Right shift */
addon= 0;
exp: /* [ E [ <sign> ] <unsigned integer> ] */

View file

@ -1001,7 +1001,7 @@ ulonglong my_strntoull10rnd_ucs2(CHARSET_INFO *cs __attribute__((unused)),
*b++= (char) wc;
}
res= my_strntoull10rnd_8bit(cs, buf, b - buf, unsign_fl, endptr, err);
res= my_strntoull10rnd_8bit(cs, buf, (uint) (b - buf), unsign_fl, endptr, err);
*endptr= (char*) nptr + 2 * (uint) (*endptr- buf);
return res;
}

View file

@ -107,7 +107,7 @@ int my_vsnprintf(char *to, size_t n, const char* fmt, va_list ap)
char *par = va_arg(ap, char *);
DBUG_ASSERT(to <= end);
if (to + abs(width) + 1 > end)
width= end - to - 1; /* sign doesn't matter */
width= (uint) (end - to - 1); /* sign doesn't matter */
memmove(to, par, abs(width));
to+= width;
continue;

View file

@ -147,7 +147,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, (uint) (st->attrend - st->attr)) : MY_XML_OK;
}
@ -179,7 +179,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, (uint) (p->attrend - p->attr)) : MY_XML_OK;
*e='\0';
p->attrend=e;