MXS-2208 Compile classify as C++
This commit is contained in:
@ -18,7 +18,7 @@ if (BUILD_QC_MYSQLEMBEDDED)
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_executable(classify classify.c)
|
add_executable(classify classify.cc)
|
||||||
target_link_libraries(classify maxscale-common)
|
target_link_libraries(classify maxscale-common)
|
||||||
|
|
||||||
add_executable(compare compare.cc testreader.cc)
|
add_executable(compare compare.cc testreader.cc)
|
||||||
|
@ -33,7 +33,7 @@ char* append(char* types, const char* type_name, size_t* lenp)
|
|||||||
|
|
||||||
*lenp += len;
|
*lenp += len;
|
||||||
|
|
||||||
char* tmp = realloc(types, *lenp);
|
char* tmp = (char*)realloc(types, *lenp);
|
||||||
|
|
||||||
if (types)
|
if (types)
|
||||||
{
|
{
|
||||||
@ -168,7 +168,7 @@ int test(FILE* input, FILE* expected)
|
|||||||
|
|
||||||
if (strsz + rd >= buffsz)
|
if (strsz + rd >= buffsz)
|
||||||
{
|
{
|
||||||
char* tmp = realloc(strbuff, (buffsz * 2) * sizeof(char));
|
char* tmp = (char*)realloc(strbuff, (buffsz * 2) * sizeof(char));
|
||||||
|
|
||||||
if (tmp == NULL)
|
if (tmp == NULL)
|
||||||
{
|
{
|
||||||
@ -211,7 +211,7 @@ int test(FILE* input, FILE* expected)
|
|||||||
memmove(strbuff, tok + 1, strsz - qlen);
|
memmove(strbuff, tok + 1, strsz - qlen);
|
||||||
strsz -= qlen;
|
strsz -= qlen;
|
||||||
memset(strbuff + strsz, 0, buffsz - strsz);
|
memset(strbuff + strsz, 0, buffsz - strsz);
|
||||||
qc_query_type_t type = qc_get_type_mask(buff);
|
uint32_t type = qc_get_type_mask(buff);
|
||||||
char expbuff[256];
|
char expbuff[256];
|
||||||
int expos = 0;
|
int expos = 0;
|
||||||
|
|
Reference in New Issue
Block a user