Commit b3378069 authored by unknown's avatar unknown

Fix -ansi -pedantic warning (can't cast a pointer to function

to a pointer to object, that is, int foo(); void *bar= (void*) foo
is not allowed.


sql/lex.h:
  Fix -ansi -pedantic warning.
sql/lex_symbol.h:
  Fix -ansi -pedantic warning.
parent a6131b85
...@@ -32,10 +32,10 @@ SYM_GROUP sym_group_rtree= {"RTree keys", "HAVE_RTREE_KEYS"}; ...@@ -32,10 +32,10 @@ SYM_GROUP sym_group_rtree= {"RTree keys", "HAVE_RTREE_KEYS"};
#define SYM(A) SYM_OR_NULL(A),0,0,&sym_group_common #define SYM(A) SYM_OR_NULL(A),0,0,&sym_group_common
#define F_SYM(A) SYM_OR_NULL(A) #define F_SYM(A) SYM_OR_NULL(A)
#define CREATE_FUNC(A) (void *)(SYM_OR_NULL(A)), &sym_group_common #define CREATE_FUNC(A) (void (*)())(SYM_OR_NULL(A)), &sym_group_common
#ifdef HAVE_SPATIAL #ifdef HAVE_SPATIAL
#define CREATE_FUNC_GEOM(A) (void *)(SYM_OR_NULL(A)), &sym_group_geom #define CREATE_FUNC_GEOM(A) (void (*)())(SYM_OR_NULL(A)), &sym_group_geom
#else #else
#define CREATE_FUNC_GEOM(A) 0, &sym_group_geom #define CREATE_FUNC_GEOM(A) 0, &sym_group_geom
#endif #endif
......
...@@ -25,7 +25,7 @@ typedef struct st_symbol { ...@@ -25,7 +25,7 @@ typedef struct st_symbol {
const char *name; const char *name;
uint tok; uint tok;
uint length; uint length;
void *create_func; void (*create_func)();
struct st_sym_group *group; struct st_sym_group *group;
} SYMBOL; } SYMBOL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment