diff options
author | Davi Arnaut <Davi.Arnaut@Sun.COM> | 2010-05-31 12:29:54 -0300 |
---|---|---|
committer | Davi Arnaut <Davi.Arnaut@Sun.COM> | 2010-05-31 12:29:54 -0300 |
commit | 5dec0c963713822cafc5f2f65b485e8846938318 (patch) | |
tree | bbbd0851e788a87bdf80dacc828f8de102b381b4 /sql/opt_range.cc | |
parent | 7e84f28c74e6e75f2093fa7e21b6a2b3781b9fe9 (diff) | |
download | mariadb-git-5dec0c963713822cafc5f2f65b485e8846938318.tar.gz |
Bug#53445: Build with -Wall and fix warnings that it generates
Fix various mismatches between function's language linkage. Any
particular function that is declared in C++ but should be callable
from C must have C linkage. Note that function types with different
linkages are also distinct. Thus, if a function type is declared in
C code, it will have C linkage (same if declared in a extern "C"
block).
Diffstat (limited to 'sql/opt_range.cc')
-rw-r--r-- | sql/opt_range.cc | 44 |
1 files changed, 24 insertions, 20 deletions
diff --git a/sql/opt_range.cc b/sql/opt_range.cc index 5e985625c78..9363b637862 100644 --- a/sql/opt_range.cc +++ b/sql/opt_range.cc @@ -1539,6 +1539,29 @@ QUICK_ROR_UNION_SELECT::QUICK_ROR_UNION_SELECT(THD *thd_param, /* + Comparison function to be used QUICK_ROR_UNION_SELECT::queue priority + queue. + + SYNPOSIS + QUICK_ROR_UNION_SELECT_queue_cmp() + arg Pointer to QUICK_ROR_UNION_SELECT + val1 First merged select + val2 Second merged select +*/ + +C_MODE_START + +static int QUICK_ROR_UNION_SELECT_queue_cmp(void *arg, uchar *val1, uchar *val2) +{ + QUICK_ROR_UNION_SELECT *self= (QUICK_ROR_UNION_SELECT*)arg; + return self->head->file->cmp_ref(((QUICK_SELECT_I*)val1)->last_rowid, + ((QUICK_SELECT_I*)val2)->last_rowid); +} + +C_MODE_END + + +/* Do post-constructor initialization. SYNOPSIS QUICK_ROR_UNION_SELECT::init() @@ -1552,7 +1575,7 @@ int QUICK_ROR_UNION_SELECT::init() { DBUG_ENTER("QUICK_ROR_UNION_SELECT::init"); if (init_queue(&queue, quick_selects.elements, 0, - FALSE , QUICK_ROR_UNION_SELECT::queue_cmp, + FALSE , QUICK_ROR_UNION_SELECT_queue_cmp, (void*) this)) { bzero(&queue, sizeof(QUEUE)); @@ -1567,25 +1590,6 @@ int QUICK_ROR_UNION_SELECT::init() /* - Comparison function to be used QUICK_ROR_UNION_SELECT::queue priority - queue. - - SYNPOSIS - QUICK_ROR_UNION_SELECT::queue_cmp() - arg Pointer to QUICK_ROR_UNION_SELECT - val1 First merged select - val2 Second merged select -*/ - -int QUICK_ROR_UNION_SELECT::queue_cmp(void *arg, uchar *val1, uchar *val2) -{ - QUICK_ROR_UNION_SELECT *self= (QUICK_ROR_UNION_SELECT*)arg; - return self->head->file->cmp_ref(((QUICK_SELECT_I*)val1)->last_rowid, - ((QUICK_SELECT_I*)val2)->last_rowid); -} - - -/* Initialize quick select for row retrieval. SYNOPSIS reset() |