summaryrefslogtreecommitdiff
path: root/extra/replace.c
diff options
context:
space:
mode:
authormonty@mysql.com/nosik.monty.fi <>2007-08-13 16:11:25 +0300
committermonty@mysql.com/nosik.monty.fi <>2007-08-13 16:11:25 +0300
commite53a73e26cf858ac48ead40927d84d54e33c1695 (patch)
treea462885d0de8206ed3a0b18affdd892bafca84c8 /extra/replace.c
parent113cd2d064e500cd3241046ab374c490d95dace8 (diff)
downloadmariadb-git-e53a73e26cf858ac48ead40927d84d54e33c1695.tar.gz
Fixed a lot of compiler warnings and errors detected by Forte C++ on Solaris
Faster thr_alarm() Added 'Opened_files' status variable to track calls to my_open() Don't give warnings when running mysql_install_db Added option --source-install to mysql_install_db I had to do the following renames() as used polymorphism didn't work with Forte compiler on 64 bit systems index_read() -> index_read_map() index_read_idx() -> index_read_idx_map() index_read_last() -> index_read_last_map()
Diffstat (limited to 'extra/replace.c')
-rw-r--r--extra/replace.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/extra/replace.c b/extra/replace.c
index f7112403b06..9d1d8335014 100644
--- a/extra/replace.c
+++ b/extra/replace.c
@@ -309,9 +309,9 @@ static int insert_pointer_name(reg1 POINTER_ARRAY *pa,char * name)
old_count*sizeof(*pa->flag));
}
pa->flag[pa->typelib.count]=0; /* Reset flag */
- pa->typelib.type_names[pa->typelib.count++]= pa->str+pa->length;
+ pa->typelib.type_names[pa->typelib.count++]= (char*) (pa->str+pa->length);
pa->typelib.type_names[pa->typelib.count]= NullS; /* Put end-mark */
- VOID(strmov(pa->str+pa->length,name));
+ VOID(strmov((char*) pa->str + pa->length, name));
pa->length+=length;
DBUG_RETURN(0);
} /* insert_pointer_name */
@@ -988,7 +988,8 @@ int n;
return 0;
/* Read in new stuff. */
- if ((i=(int) my_read(fd, buffer + bufbytes, (uint) bufread,MYF(MY_WME))) < 0)
+ if ((i=(int) my_read(fd, (uchar*) buffer + bufbytes,
+ (size_t) bufread, MYF(MY_WME))) < 0)
return -1;
/* Kludge to pretend every nonempty file ends with a newline. */
@@ -1039,7 +1040,7 @@ FILE *in,*out;
return 1;
if (!my_eof)
out_buff[length++]=save_char; /* Don't write added newline */
- if (my_fwrite(out,out_buff,length,MYF(MY_WME | MY_NABP)))
+ if (my_fwrite(out, (uchar*) out_buff, length, MYF(MY_WME | MY_NABP)))
DBUG_RETURN(1);
}
}