diff --git a/query_classifier/test/CMakeLists.txt b/query_classifier/test/CMakeLists.txt index 5310121b4..ae1fccab6 100644 --- a/query_classifier/test/CMakeLists.txt +++ b/query_classifier/test/CMakeLists.txt @@ -18,7 +18,7 @@ if (BUILD_QC_MYSQLEMBEDDED) endif() endif() - add_executable(classify classify.c) + add_executable(classify classify.cc) target_link_libraries(classify maxscale-common) add_executable(compare compare.cc testreader.cc) diff --git a/query_classifier/test/classify.c b/query_classifier/test/classify.cc similarity index 98% rename from query_classifier/test/classify.c rename to query_classifier/test/classify.cc index 10f612c45..4fcd0a816 100644 --- a/query_classifier/test/classify.c +++ b/query_classifier/test/classify.cc @@ -33,7 +33,7 @@ char* append(char* types, const char* type_name, size_t* lenp) *lenp += len; - char* tmp = realloc(types, *lenp); + char* tmp = (char*)realloc(types, *lenp); if (types) { @@ -168,7 +168,7 @@ int test(FILE* input, FILE* expected) if (strsz + rd >= buffsz) { - char* tmp = realloc(strbuff, (buffsz * 2) * sizeof(char)); + char* tmp = (char*)realloc(strbuff, (buffsz * 2) * sizeof(char)); if (tmp == NULL) { @@ -211,7 +211,7 @@ int test(FILE* input, FILE* expected) memmove(strbuff, tok + 1, strsz - qlen); strsz -= qlen; 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]; int expos = 0;