summaryrefslogtreecommitdiff
path: root/mysys
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 /mysys
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 'mysys')
-rw-r--r--mysys/default.c2
-rw-r--r--mysys/default_modify.c6
-rw-r--r--mysys/mf_iocache.c2
-rw-r--r--mysys/mf_keycache.c2
-rw-r--r--mysys/my_alloc.c2
-rw-r--r--mysys/my_getopt.c10
-rw-r--r--mysys/my_mmap.c2
-rw-r--r--mysys/my_once.c2
-rw-r--r--mysys/string.c2
9 files changed, 15 insertions, 15 deletions
diff --git a/mysys/default.c b/mysys/default.c
index ab9bdaf0ed2..cffd57c37f1 100644
--- a/mysys/default.c
+++ b/mysys/default.c
@@ -856,7 +856,7 @@ static void init_default_directories()
/* Only add shared system directory if different from default. */
if (GetSystemWindowsDirectory(shared_system_dir,sizeof(shared_system_dir)) &&
strcmp(system_dir, shared_system_dir))
- *ptr++= &shared_system_dir;
+ *ptr++= (char *)&shared_system_dir;
#endif
#elif defined(__NETWARE__)
diff --git a/mysys/default_modify.c b/mysys/default_modify.c
index 721ca596428..fe784c7a44b 100644
--- a/mysys/default_modify.c
+++ b/mysys/default_modify.c
@@ -58,8 +58,8 @@ int modify_defaults_file(const char *file_location, const char *option,
if (my_fstat(fileno(cnf_file), &file_stat, MYF(0)))
goto err;
- optlen= strlen(option);
- optval_len= strlen(option_value);
+ optlen= (uint) strlen(option);
+ optval_len= (uint) strlen(option_value);
/*
Reserve space to read the contents of the file and some more
@@ -79,7 +79,7 @@ int modify_defaults_file(const char *file_location, const char *option,
FN_REFLEN), MYF(MY_WME))))
goto malloc_err;
- sect_len= strlen(section_name);
+ sect_len= (uint) strlen(section_name);
for (dst_ptr= file_buffer; fgets(linebuff, BUFF_SIZE, cnf_file); )
{
diff --git a/mysys/mf_iocache.c b/mysys/mf_iocache.c
index a55a2d81c2c..b000af19aa0 100644
--- a/mysys/mf_iocache.c
+++ b/mysys/mf_iocache.c
@@ -601,7 +601,7 @@ int _my_b_read_r(register IO_CACHE *info, byte *Buffer, uint Count)
info->error= info->share->active->error;
info->read_end= info->share->active->read_end;
info->pos_in_file= info->share->active->pos_in_file;
- len= (info->error == -1 ? -1 : info->read_end-info->buffer);
+ len= (int) (info->error == -1 ? -1 : info->read_end-info->buffer);
}
info->read_pos=info->buffer;
info->seek_not_done=0;
diff --git a/mysys/mf_keycache.c b/mysys/mf_keycache.c
index feb9c77a5b9..cb2e0c98e8a 100644
--- a/mysys/mf_keycache.c
+++ b/mysys/mf_keycache.c
@@ -2191,7 +2191,7 @@ static int flush_cached_blocks(KEY_CACHE *keycache,
{
int error;
int last_errno= 0;
- uint count= end-cache;
+ uint count= (uint) (end-cache);
/* Don't lock the cache during the flush */
keycache_pthread_mutex_unlock(&keycache->cache_lock);
diff --git a/mysys/my_alloc.c b/mysys/my_alloc.c
index 4aa31829c59..619d6bd5654 100644
--- a/mysys/my_alloc.c
+++ b/mysys/my_alloc.c
@@ -333,7 +333,7 @@ void set_prealloc_root(MEM_ROOT *root, char *ptr)
char *strdup_root(MEM_ROOT *root,const char *str)
{
- return strmake_root(root, str, strlen(str));
+ return strmake_root(root, str, (uint) strlen(str));
}
char *strmake_root(MEM_ROOT *root,const char *str, uint len)
diff --git a/mysys/my_getopt.c b/mysys/my_getopt.c
index 5e93ad56cb5..68bf65b2abe 100644
--- a/mysys/my_getopt.c
+++ b/mysys/my_getopt.c
@@ -180,7 +180,7 @@ int handle_options(int *argc, char ***argv,
}
opt_str= check_struct_option(cur_arg, key_name);
optend= strcend(opt_str, '=');
- length= optend - opt_str;
+ length= (uint) (optend - opt_str);
if (*optend == '=')
optend++;
else
@@ -323,7 +323,7 @@ int handle_options(int *argc, char ***argv,
return EXIT_NO_ARGUMENT_ALLOWED;
}
value= optp->var_type & GET_ASK_ADDR ?
- (*getopt_get_addr)(key_name, strlen(key_name), optp) : optp->value;
+ (*getopt_get_addr)(key_name, (uint) strlen(key_name), optp) : optp->value;
if (optp->arg_type == NO_ARG)
{
@@ -519,7 +519,7 @@ static char *check_struct_option(char *cur_arg, char *key_name)
*/
if (end - ptr > 1)
{
- uint len= ptr - cur_arg;
+ uint len= (uint) (ptr - cur_arg);
set_if_smaller(len, FN_REFLEN-1);
strmake(key_name, cur_arg, len);
return ++ptr;
@@ -833,7 +833,7 @@ void my_print_help(const struct my_option *options)
if (strlen(optp->name))
{
printf("--%s", optp->name);
- col+= 2 + strlen(optp->name);
+ col+= 2 + (uint) strlen(optp->name);
if ((optp->var_type & GET_TYPE_MASK) == GET_STR ||
(optp->var_type & GET_TYPE_MASK) == GET_STR_ALLOC)
{
@@ -904,7 +904,7 @@ void my_print_variables(const struct my_option *options)
if (value)
{
printf("%s", optp->name);
- length= strlen(optp->name);
+ length= (uint) strlen(optp->name);
for (; length < name_space; length++)
putchar(' ');
switch ((optp->var_type & GET_TYPE_MASK)) {
diff --git a/mysys/my_mmap.c b/mysys/my_mmap.c
index cd84630a761..21bfddae46c 100644
--- a/mysys/my_mmap.c
+++ b/mysys/my_mmap.c
@@ -53,7 +53,7 @@ void *my_mmap(void *addr, size_t len, int prot,
flProtect|=SEC_COMMIT;
hFileMap=CreateFileMapping(hFile, &mmap_security_attributes,
- PAGE_READWRITE, 0, len, NULL);
+ PAGE_READWRITE, 0, (DWORD) len, NULL);
if (hFileMap == 0)
return MAP_FAILED;
diff --git a/mysys/my_once.c b/mysys/my_once.c
index a4201810b03..ab5fcc51c0e 100644
--- a/mysys/my_once.c
+++ b/mysys/my_once.c
@@ -81,7 +81,7 @@ gptr my_once_alloc(unsigned int Size, myf MyFlags)
char *my_once_strdup(const char *src,myf myflags)
{
- uint len=strlen(src)+1;
+ uint len= (uint) strlen(src)+1;
char *dst=my_once_alloc(len, myflags);
if (dst)
memcpy(dst, src, len);
diff --git a/mysys/string.c b/mysys/string.c
index ea747bc9847..dfd42d137dd 100644
--- a/mysys/string.c
+++ b/mysys/string.c
@@ -91,7 +91,7 @@ my_bool dynstr_realloc(DYNAMIC_STRING *str, ulong additional_size)
my_bool dynstr_append(DYNAMIC_STRING *str, const char *append)
{
- return dynstr_append_mem(str,append,strlen(append));
+ return dynstr_append_mem(str,append,(uint) strlen(append));
}