Commit b3378069 authored by unknown's avatar unknown
Browse files

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
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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
+1 −1
Original line number Diff line number Diff line
@@ -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;