Skip to content

Commit b3e9508

Browse files
committed
Fix function pointer type mismatch
1 parent e023f9a commit b3e9508

File tree

4 files changed

+32
-32
lines changed

4 files changed

+32
-32
lines changed

storage/innobase/fts/fts0pars.cc

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ extern int fts_lexer(YYSTYPE*, fts_lexer_t*);
8787
extern int fts_blexer(YYSTYPE*, yyscan_t);
8888
extern int fts_tlexer(YYSTYPE*, yyscan_t);
8989

90-
typedef int (*fts_scan)();
90+
9191

9292
extern int ftserror(const char* p);
9393

@@ -102,8 +102,8 @@ extern int ftserror(const char* p);
102102

103103
#define YYTOKENFREE(token) fts_ast_string_free((token))
104104

105-
typedef int (*fts_scanner_alt)(YYSTYPE* val, yyscan_t yyscanner);
106-
typedef int (*fts_scanner)();
105+
106+
typedef int (*fts_scanner)(YYSTYPE* val, yyscan_t yyscanner);
107107

108108
struct fts_lexer_t {
109109
fts_scanner scanner;
@@ -1950,7 +1950,7 @@ fts_lexer_create(
19501950
reinterpret_cast<const char*>(query),
19511951
static_cast<int>(query_len),
19521952
fts_lexer->yyscanner);
1953-
fts_lexer->scanner = reinterpret_cast<fts_scan>(fts_blexer);
1953+
fts_lexer->scanner = fts_blexer;
19541954
/* FIXME: Debugging */
19551955
/* fts0bset_debug(1 , fts_lexer->yyscanner); */
19561956
} else {
@@ -1959,7 +1959,7 @@ fts_lexer_create(
19591959
reinterpret_cast<const char*>(query),
19601960
static_cast<int>(query_len),
19611961
fts_lexer->yyscanner);
1962-
fts_lexer->scanner = reinterpret_cast<fts_scan>(fts_tlexer);
1962+
fts_lexer->scanner = fts_tlexer;
19631963
}
19641964

19651965
return(fts_lexer);
@@ -1973,7 +1973,7 @@ fts_lexer_free(
19731973
/*===========*/
19741974
fts_lexer_t* fts_lexer)
19751975
{
1976-
if (fts_lexer->scanner == (fts_scan) fts_blexer) {
1976+
if (fts_lexer->scanner == fts_blexer) {
19771977
fts0blex_destroy(fts_lexer->yyscanner);
19781978
} else {
19791979
fts0tlex_destroy(fts_lexer->yyscanner);
@@ -1991,9 +1991,9 @@ fts_lexer(
19911991
YYSTYPE* val,
19921992
fts_lexer_t* fts_lexer)
19931993
{
1994-
fts_scanner_alt func_ptr;
1994+
fts_scanner func_ptr;
19951995

1996-
func_ptr = (fts_scanner_alt) fts_lexer->scanner;
1996+
func_ptr = fts_lexer->scanner;
19971997

19981998
return(func_ptr(val, fts_lexer->yyscanner));
19991999
}

storage/innobase/fts/fts0pars.y

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ extern int fts_lexer(YYSTYPE*, fts_lexer_t*);
3535
extern int fts_blexer(YYSTYPE*, yyscan_t);
3636
extern int fts_tlexer(YYSTYPE*, yyscan_t);
3737

38-
typedef int (*fts_scan)();
38+
3939

4040
extern int ftserror(const char* p);
4141

@@ -48,8 +48,8 @@ extern int ftserror(const char* p);
4848
#define YYPARSE_PARAM state
4949
#define YYLEX_PARAM ((fts_ast_state_t*) state)->lexer
5050

51-
typedef int (*fts_scanner_alt)(YYSTYPE* val, yyscan_t yyscanner);
52-
typedef int (*fts_scanner)();
51+
52+
typedef int (*fts_scanner)(YYSTYPE* val, yyscan_t yyscanner);
5353

5454
struct fts_lexer_struct {
5555
fts_scanner scanner;
@@ -238,13 +238,13 @@ fts_lexer_create(
238238
if (boolean_mode) {
239239
fts0blex_init(&fts_lexer->yyscanner);
240240
fts0b_scan_bytes((char*) query, query_len, fts_lexer->yyscanner);
241-
fts_lexer->scanner = (fts_scan) fts_blexer;
241+
fts_lexer->scanner = fts_blexer;
242242
/* FIXME: Debugging */
243243
/* fts0bset_debug(1 , fts_lexer->yyscanner); */
244244
} else {
245245
fts0tlex_init(&fts_lexer->yyscanner);
246246
fts0t_scan_bytes((char*) query, query_len, fts_lexer->yyscanner);
247-
fts_lexer->scanner = (fts_scan) fts_tlexer;
247+
fts_lexer->scanner = fts_tlexer;
248248
}
249249

250250
return(fts_lexer);
@@ -258,7 +258,7 @@ fts_lexer_free(
258258
/*===========*/
259259
fts_lexer_t* fts_lexer)
260260
{
261-
if (fts_lexer->scanner == (fts_scan) fts_blexer) {
261+
if (fts_lexer->scanner == fts_blexer) {
262262
fts0blex_destroy(fts_lexer->yyscanner);
263263
} else {
264264
fts0tlex_destroy(fts_lexer->yyscanner);
@@ -276,9 +276,9 @@ fts_lexer(
276276
YYSTYPE* val,
277277
fts_lexer_t* fts_lexer)
278278
{
279-
fts_scanner_alt func_ptr;
279+
fts_scanner func_ptr;
280280

281-
func_ptr = (fts_scanner_alt) fts_lexer->scanner;
281+
func_ptr = fts_lexer->scanner;
282282

283283
return(func_ptr(val, fts_lexer->yyscanner));
284284
}

storage/xtradb/fts/fts0pars.cc

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ extern int fts_lexer(YYSTYPE*, fts_lexer_t*);
8787
extern int fts_blexer(YYSTYPE*, yyscan_t);
8888
extern int fts_tlexer(YYSTYPE*, yyscan_t);
8989

90-
typedef int (*fts_scan)();
90+
9191

9292
extern int ftserror(const char* p);
9393

@@ -102,8 +102,8 @@ extern int ftserror(const char* p);
102102

103103
#define YYTOKENFREE(token) fts_ast_string_free((token))
104104

105-
typedef int (*fts_scanner_alt)(YYSTYPE* val, yyscan_t yyscanner);
106-
typedef int (*fts_scanner)();
105+
106+
typedef int (*fts_scanner)(YYSTYPE* val, yyscan_t yyscanner);
107107

108108
struct fts_lexer_t {
109109
fts_scanner scanner;
@@ -1950,7 +1950,7 @@ fts_lexer_create(
19501950
reinterpret_cast<const char*>(query),
19511951
static_cast<int>(query_len),
19521952
fts_lexer->yyscanner);
1953-
fts_lexer->scanner = reinterpret_cast<fts_scan>(fts_blexer);
1953+
fts_lexer->scanner = fts_blexer;
19541954
/* FIXME: Debugging */
19551955
/* fts0bset_debug(1 , fts_lexer->yyscanner); */
19561956
} else {
@@ -1959,7 +1959,7 @@ fts_lexer_create(
19591959
reinterpret_cast<const char*>(query),
19601960
static_cast<int>(query_len),
19611961
fts_lexer->yyscanner);
1962-
fts_lexer->scanner = reinterpret_cast<fts_scan>(fts_tlexer);
1962+
fts_lexer->scanner = fts_tlexer;
19631963
}
19641964

19651965
return(fts_lexer);
@@ -1973,7 +1973,7 @@ fts_lexer_free(
19731973
/*===========*/
19741974
fts_lexer_t* fts_lexer)
19751975
{
1976-
if (fts_lexer->scanner == (fts_scan) fts_blexer) {
1976+
if (fts_lexer->scanner == fts_blexer) {
19771977
fts0blex_destroy(fts_lexer->yyscanner);
19781978
} else {
19791979
fts0tlex_destroy(fts_lexer->yyscanner);
@@ -1991,9 +1991,9 @@ fts_lexer(
19911991
YYSTYPE* val,
19921992
fts_lexer_t* fts_lexer)
19931993
{
1994-
fts_scanner_alt func_ptr;
1994+
fts_scanner func_ptr;
19951995

1996-
func_ptr = (fts_scanner_alt) fts_lexer->scanner;
1996+
func_ptr = fts_lexer->scanner;
19971997

19981998
return(func_ptr(val, fts_lexer->yyscanner));
19991999
}

storage/xtradb/fts/fts0pars.y

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ extern int fts_lexer(YYSTYPE*, fts_lexer_t*);
3535
extern int fts_blexer(YYSTYPE*, yyscan_t);
3636
extern int fts_tlexer(YYSTYPE*, yyscan_t);
3737

38-
typedef int (*fts_scan)();
38+
3939

4040
extern int ftserror(const char* p);
4141

@@ -48,8 +48,8 @@ extern int ftserror(const char* p);
4848
#define YYPARSE_PARAM state
4949
#define YYLEX_PARAM ((fts_ast_state_t*) state)->lexer
5050

51-
typedef int (*fts_scanner_alt)(YYSTYPE* val, yyscan_t yyscanner);
52-
typedef int (*fts_scanner)();
51+
52+
typedef int (*fts_scanner)(YYSTYPE* val, yyscan_t yyscanner);
5353

5454
struct fts_lexer_struct {
5555
fts_scanner scanner;
@@ -238,13 +238,13 @@ fts_lexer_create(
238238
if (boolean_mode) {
239239
fts0blex_init(&fts_lexer->yyscanner);
240240
fts0b_scan_bytes((char*) query, query_len, fts_lexer->yyscanner);
241-
fts_lexer->scanner = (fts_scan) fts_blexer;
241+
fts_lexer->scanner = fts_blexer;
242242
/* FIXME: Debugging */
243243
/* fts0bset_debug(1 , fts_lexer->yyscanner); */
244244
} else {
245245
fts0tlex_init(&fts_lexer->yyscanner);
246246
fts0t_scan_bytes((char*) query, query_len, fts_lexer->yyscanner);
247-
fts_lexer->scanner = (fts_scan) fts_tlexer;
247+
fts_lexer->scanner = fts_tlexer;
248248
}
249249

250250
return(fts_lexer);
@@ -258,7 +258,7 @@ fts_lexer_free(
258258
/*===========*/
259259
fts_lexer_t* fts_lexer)
260260
{
261-
if (fts_lexer->scanner == (fts_scan) fts_blexer) {
261+
if (fts_lexer->scanner == fts_blexer) {
262262
fts0blex_destroy(fts_lexer->yyscanner);
263263
} else {
264264
fts0tlex_destroy(fts_lexer->yyscanner);
@@ -276,9 +276,9 @@ fts_lexer(
276276
YYSTYPE* val,
277277
fts_lexer_t* fts_lexer)
278278
{
279-
fts_scanner_alt func_ptr;
279+
fts_scanner func_ptr;
280280

281-
func_ptr = (fts_scanner_alt) fts_lexer->scanner;
281+
func_ptr = fts_lexer->scanner;
282282

283283
return(func_ptr(val, fts_lexer->yyscanner));
284284
}

0 commit comments

Comments
 (0)