summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <jani@a193-229-222-105.elisa-laajakaista.fi>2005-07-20 13:27:57 +0300
committerunknown <jani@a193-229-222-105.elisa-laajakaista.fi>2005-07-20 13:27:57 +0300
commit44589256c842d3694acebbc1284ef9f61806b1f7 (patch)
tree15315242bff5e24b976dc8bebb97477fd3a000cd
parent5dd494394c43e6e19d4460ae3845a958d62576c2 (diff)
downloadmariadb-git-44589256c842d3694acebbc1284ef9f61806b1f7.tar.gz
Added some missing casts and changed a define for alloca().
client/mysqldump.c: Added casts. include/my_sys.h: Define for alloca() changed for Metrowerks compiler. myisam/rt_split.c: Added cast.
-rw-r--r--client/mysqldump.c4
-rw-r--r--include/my_sys.h2
-rw-r--r--myisam/rt_split.c5
3 files changed, 6 insertions, 5 deletions
diff --git a/client/mysqldump.c b/client/mysqldump.c
index 4d340cb4051..d29667052ee 100644
--- a/client/mysqldump.c
+++ b/client/mysqldump.c
@@ -2321,9 +2321,9 @@ static int dump_selected_tables(char *db, char **table_names, int tables)
{
const char *table_name= hash_element(&dump_tables, i);
DBUG_PRINT("info",("Dumping table %s", table_name));
- numrows= getTableStructure(table_name, db);
+ numrows= getTableStructure((char*) table_name, db);
if (!dFlag && numrows > 0)
- dumpTable(numrows, table_name);
+ dumpTable(numrows, (char*) table_name);
}
hash_free(&dump_tables);
my_free(order_by, MYF(MY_ALLOW_ZERO_PTR));
diff --git a/include/my_sys.h b/include/my_sys.h
index 70c410e66d8..e56f07a8140 100644
--- a/include/my_sys.h
+++ b/include/my_sys.h
@@ -165,7 +165,7 @@ extern char *my_strdup_with_length(const byte *from, uint length,
#endif /* _AIX */
#if defined(__MWERKS__)
#undef alloca
-#define alloca __alloca
+#define alloca _alloca
#endif /* __MWERKS__ */
#if defined(__GNUC__) && !defined(HAVE_ALLOCA_H) && ! defined(alloca)
#define alloca __builtin_alloca
diff --git a/myisam/rt_split.c b/myisam/rt_split.c
index 005e86805bb..664dd2c75e3 100644
--- a/myisam/rt_split.c
+++ b/myisam/rt_split.c
@@ -267,8 +267,9 @@ int rtree_split_page(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *page, uchar *key,
n_dim = keyinfo->keysegs / 2;
- if (!(coord_buf= my_alloca(n_dim * 2 * sizeof(double) * (max_keys + 1 + 4) +
- sizeof(SplitStruct) * (max_keys + 1))))
+ if (!(coord_buf= (double*) my_alloca(n_dim * 2 * sizeof(double) *
+ (max_keys + 1 + 4) +
+ sizeof(SplitStruct) * (max_keys + 1))))
return -1;
task= (SplitStruct *)(coord_buf + n_dim * 2 * (max_keys + 1 + 4));