1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

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-13 11:41:47 -05:00
94 changed files with 241 additions and 240 deletions

View File

@ -84,7 +84,7 @@ static void wait_for_kill_signal(THD *thd)
uint filename_to_tablename(const char *from, char *to, uint to_length)
{
uint errors;
uint res;
size_t res;
DBUG_ENTER("filename_to_tablename");
DBUG_PRINT("enter", ("from '%s'", from));
@ -224,7 +224,7 @@ uint build_table_filename(char *buff, size_t bufflen, const char *db,
char *end = buff + bufflen;
/* Don't add FN_ROOTDIR if mysql_data_home already includes it */
char *pos = strnmov(buff, mysql_data_home, bufflen);
int rootdir_len= strlen(FN_ROOTDIR);
size_t rootdir_len= strlen(FN_ROOTDIR);
if (pos - rootdir_len >= buff &&
memcmp(pos - rootdir_len, FN_ROOTDIR, rootdir_len) != 0)
pos= strnmov(pos, FN_ROOTDIR, end - pos);
@ -273,7 +273,7 @@ uint build_tmptable_filename(THD* thd, char *buff, size_t bufflen)
my_casedn_str(files_charset_info, p);
}
uint length= unpack_filename(buff, buff);
size_t length= unpack_filename(buff, buff);
DBUG_PRINT("exit", ("buff: '%s'", buff));
DBUG_RETURN(length);
}
@ -1991,7 +1991,7 @@ void calculate_interval_lengths(CHARSET_INFO *cs, TYPELIB *interval,
for (pos= interval->type_names, len= interval->type_lengths;
*pos ; pos++, len++)
{
uint length= cs->cset->numchars(cs, *pos, *pos + *len);
size_t length= cs->cset->numchars(cs, *pos, *pos + *len);
*tot_length+= length;
set_if_bigger(*max_length, (uint32)length);
}
@ -2320,7 +2320,7 @@ mysql_prepare_create_table(THD *thd, HA_CREATE_INFO *create_info,
DBUG_ASSERT(comma_length > 0);
for (uint i= 0; (tmp= int_it++); i++)
{
uint lengthsp;
size_t lengthsp;
if (String::needs_conversion(tmp->length(), tmp->charset(),
cs, &dummy))
{
@ -4236,7 +4236,7 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables,
(!(alter_info->flags & ALTER_ALL_PARTITION)))
{
char buff[FN_REFLEN + MYSQL_ERRMSG_SIZE];
uint length;
size_t length;
DBUG_PRINT("admin", ("sending non existent partition error"));
protocol->prepare_for_resend();
protocol->store(table_name, system_charset_info);
@ -4318,7 +4318,7 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables,
{
/* purecov: begin inspected */
char buff[FN_REFLEN + MYSQL_ERRMSG_SIZE];
uint length;
size_t length;
DBUG_PRINT("admin", ("sending error message"));
protocol->prepare_for_resend();
protocol->store(table_name, system_charset_info);
@ -4436,7 +4436,7 @@ send_result_message:
case HA_ADMIN_NOT_IMPLEMENTED:
{
char buf[MYSQL_ERRMSG_SIZE];
uint length=my_snprintf(buf, sizeof(buf),
size_t length=my_snprintf(buf, sizeof(buf),
ER(ER_CHECK_NOT_IMPLEMENTED), operator_name);
protocol->store(STRING_WITH_LEN("note"), system_charset_info);
protocol->store(buf, length, system_charset_info);
@ -4446,7 +4446,7 @@ send_result_message:
case HA_ADMIN_NOT_BASE_TABLE:
{
char buf[MYSQL_ERRMSG_SIZE];
uint length= my_snprintf(buf, sizeof(buf),
size_t length= my_snprintf(buf, sizeof(buf),
ER(ER_BAD_TABLE_ERROR), table_name);
protocol->store(STRING_WITH_LEN("note"), system_charset_info);
protocol->store(buf, length, system_charset_info);
@ -4574,7 +4574,7 @@ send_result_message:
case HA_ADMIN_NEEDS_ALTER:
{
char buf[MYSQL_ERRMSG_SIZE];
uint length;
size_t length;
protocol->store(STRING_WITH_LEN("error"), system_charset_info);
length=my_snprintf(buf, sizeof(buf), ER(ER_TABLE_NEEDS_UPGRADE),
@ -4587,7 +4587,7 @@ send_result_message:
default: // Probably HA_ADMIN_INTERNAL_ERROR
{
char buf[MYSQL_ERRMSG_SIZE];
uint length=my_snprintf(buf, sizeof(buf),
size_t length=my_snprintf(buf, sizeof(buf),
"Unknown - internal error %d during operation",
result_code);
protocol->store(STRING_WITH_LEN("error"), system_charset_info);