Browse Source

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.
pull/374/head
unknown 19 years ago
parent
commit
b33780693c
  1. 4
      sql/lex.h
  2. 2
      sql/lex_symbol.h

4
sql/lex.h

@ -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 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
#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
#define CREATE_FUNC_GEOM(A) 0, &sym_group_geom
#endif

2
sql/lex_symbol.h

@ -25,7 +25,7 @@ typedef struct st_symbol {
const char *name;
uint tok;
uint length;
void *create_func;
void (*create_func)();
struct st_sym_group *group;
} SYMBOL;

Loading…
Cancel
Save