diff options
author | unknown <kostja@bodhi.local> | 2006-07-09 13:03:51 +0400 |
---|---|---|
committer | unknown <kostja@bodhi.local> | 2006-07-09 13:03:51 +0400 |
commit | 46079624e2b40b7882aceece3a9a8d1f20dc547a (patch) | |
tree | 498c5c03965d4596ff78cc1ca86b1b3fd80c729c /sql/sql_udf.cc | |
parent | cad24c097ebc348c1dcb1dd888a0fb89a3844cde (diff) | |
download | mariadb-git-46079624e2b40b7882aceece3a9a8d1f20dc547a.tar.gz |
Fix compiler warnings in sql_udf.h: ISO C++ forbids casting
between pointer to function and pointer to object.
sql/item_func.cc:
Use typedef names instead of hard-coded types for udf init/deinit
functions.
sql/sql_udf.cc:
Use typedef names for udf function types.
Diffstat (limited to 'sql/sql_udf.cc')
-rw-r--r-- | sql/sql_udf.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sql/sql_udf.cc b/sql/sql_udf.cc index 95589a58b37..8f98bab5c04 100644 --- a/sql/sql_udf.cc +++ b/sql/sql_udf.cc @@ -83,7 +83,7 @@ static char *init_syms(udf_func *tmp, char *nm) { char *end; - if (!((tmp->func= dlsym(tmp->dlhandle, tmp->name.str)))) + if (!((tmp->func= (Udf_func_any) dlsym(tmp->dlhandle, tmp->name.str)))) return tmp->name.str; end=strmov(nm,tmp->name.str); @@ -91,18 +91,18 @@ static char *init_syms(udf_func *tmp, char *nm) if (tmp->type == UDFTYPE_AGGREGATE) { (void)strmov(end, "_clear"); - if (!((tmp->func_clear= dlsym(tmp->dlhandle, nm)))) + if (!((tmp->func_clear= (Udf_func_clear) dlsym(tmp->dlhandle, nm)))) return nm; (void)strmov(end, "_add"); - if (!((tmp->func_add= dlsym(tmp->dlhandle, nm)))) + if (!((tmp->func_add= (Udf_func_add) dlsym(tmp->dlhandle, nm)))) return nm; } (void) strmov(end,"_deinit"); - tmp->func_deinit= dlsym(tmp->dlhandle, nm); + tmp->func_deinit= (Udf_func_deinit) dlsym(tmp->dlhandle, nm); (void) strmov(end,"_init"); - tmp->func_init= dlsym(tmp->dlhandle, nm); + tmp->func_init= (Udf_func_init) dlsym(tmp->dlhandle, nm); /* to prefent loading "udf" from, e.g. libc.so |