diff options
author | Ignacio Galarza <iggy@mysql.com> | 2009-02-10 17:47:54 -0500 |
---|---|---|
committer | Ignacio Galarza <iggy@mysql.com> | 2009-02-10 17:47:54 -0500 |
commit | 54fbbf9591e21cda9f7b26c2d795d88f51827f07 (patch) | |
tree | 6d7f0073845344099159d82b6dfe2e017670b700 /strings | |
parent | 4568152518d075ec543bcc55b77241e4a5bf7c17 (diff) | |
download | mariadb-git-54fbbf9591e21cda9f7b26c2d795d88f51827f07.tar.gz |
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
Diffstat (limited to 'strings')
-rw-r--r-- | strings/ctype-mb.c | 4 | ||||
-rw-r--r-- | strings/ctype-simple.c | 10 | ||||
-rw-r--r-- | strings/ctype-ucs2.c | 2 | ||||
-rw-r--r-- | strings/my_vsnprintf.c | 2 | ||||
-rw-r--r-- | strings/xml.c | 4 |
5 files changed, 11 insertions, 11 deletions
diff --git a/strings/ctype-mb.c b/strings/ctype-mb.c index b370714e464..1e0523e86bc 100644 --- a/strings/ctype-mb.c +++ b/strings/ctype-mb.c @@ -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, diff --git a/strings/ctype-simple.c b/strings/ctype-simple.c index 99e02e02014..35f0979b461 100644 --- a/strings/ctype-simple.c +++ b/strings/ctype-simple.c @@ -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> ] */ diff --git a/strings/ctype-ucs2.c b/strings/ctype-ucs2.c index dd8d1395ad4..65e4182d564 100644 --- a/strings/ctype-ucs2.c +++ b/strings/ctype-ucs2.c @@ -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; } diff --git a/strings/my_vsnprintf.c b/strings/my_vsnprintf.c index 93d228a1954..c1c68b48b13 100644 --- a/strings/my_vsnprintf.c +++ b/strings/my_vsnprintf.c @@ -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; diff --git a/strings/xml.c b/strings/xml.c index 5f8283f2ea8..850d22da352 100644 --- a/strings/xml.c +++ b/strings/xml.c @@ -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; |