diff --git a/system-test/auth_change_user_loop.cpp b/system-test/auth_change_user_loop.cpp index 7c1de4288..f6bdbd442 100644 --- a/system-test/auth_change_user_loop.cpp +++ b/system-test/auth_change_user_loop.cpp @@ -118,7 +118,7 @@ int main(int argc, char* argv[]) Test->maxscales->password, NULL); - Test->tprintf("Dropping user", Test->maxscales->user_name); + Test->tprintf("Dropping user"); Test->try_query(Test->maxscales->conn_rwsplit[0], (char*) "DROP USER user@'%%';"); Test->maxscales->verbose = true; diff --git a/system-test/long_test.cpp b/system-test/long_test.cpp index 0a8153633..e20e73f22 100644 --- a/system-test/long_test.cpp +++ b/system-test/long_test.cpp @@ -122,7 +122,7 @@ int main(int argc, char *argv[]) { data[j][i].sql = (char*) malloc((i +1) * 32 * 14 + 32); create_insert_string(data[j][i].sql, (i + 1) * 32, i); - Test->tprintf("sqL %d: %d\n", i, strlen(data[j][i].sql)); + Test->tprintf("sqL %d: %zu\n", i, strlen(data[j][i].sql)); data[j][i].exit_flag = false; data[j][i].id = i; pthread_create(&thread_id[j][i], NULL, thread[j], &data[j][i]); diff --git a/system-test/maxtest/include/maxtest/testconnections.hh b/system-test/maxtest/include/maxtest/testconnections.hh index 52a8edc6d..06b59cfce 100644 --- a/system-test/maxtest/include/maxtest/testconnections.hh +++ b/system-test/maxtest/include/maxtest/testconnections.hh @@ -357,7 +357,7 @@ public: /** * @brief printf with automatic timestamps */ - void tprintf(const char* format, ...); + void tprintf(const char* format, ...) mxb_attribute((format(printf, 2, 3))); /** * @brief injects a message into maxscale.log diff --git a/system-test/maxtest/src/big_load.cc b/system-test/maxtest/src/big_load.cc index 27fe0d734..ab0f04af1 100644 --- a/system-test/maxtest/src/big_load.cc +++ b/system-test/maxtest/src/big_load.cc @@ -102,7 +102,7 @@ void load(long int* new_inserts, Test->tprintf("COM_INSERT and COM_SELECT after executing test\n"); get_global_status_allnodes(&new_selects[0], &new_inserts[0], nodes, 0); print_delta(&new_selects[0], &new_inserts[0], &selects[0], &inserts[0], nodes->N); - Test->tprintf("First group of threads did %d queries, second - %d \n", data.i1, data.i2); + Test->tprintf("First group of threads did %ld queries, second - %ld \n", data.i1, data.i2); } nodes->close_connections(); *i1 = data.i1; diff --git a/system-test/maxtest/src/blob_test.cc b/system-test/maxtest/src/blob_test.cc index e4c5188af..70534b9bb 100644 --- a/system-test/maxtest/src/blob_test.cc +++ b/system-test/maxtest/src/blob_test.cc @@ -55,7 +55,7 @@ int test_longblob(TestConnections* Test, - Test->tprintf("Sending data in %d bytes chunks, total size is %d\n", + Test->tprintf("Sending data in %lu bytes chunks, total size is %lu\n", size * sizeof(unsigned long), (size * sizeof(unsigned long)) * chunks); for (i = 0; i < chunks; i++) diff --git a/system-test/maxtest/src/testconnections.cc b/system-test/maxtest/src/testconnections.cc index f96004103..100f07a28 100644 --- a/system-test/maxtest/src/testconnections.cc +++ b/system-test/maxtest/src/testconnections.cc @@ -689,7 +689,7 @@ void TestConnections::read_mdbci_info() } if (verbose) { - tprintf(m_network_config.c_str()); + tprintf("%s", m_network_config.c_str()); } } diff --git a/system-test/mxs1713_lots_of_databases.cpp b/system-test/mxs1713_lots_of_databases.cpp index 2f34ba327..83cbeb168 100644 --- a/system-test/mxs1713_lots_of_databases.cpp +++ b/system-test/mxs1713_lots_of_databases.cpp @@ -28,7 +28,7 @@ int main(int argc, char** argv) test.repl->sync_slaves(); test.tprintf("Done!"); - test.tprintf("Opening a connection with each database as the default database...", db_list.size()); + test.tprintf("Opening a connection with each database as the default database..."); std::set errors; int i = 0; diff --git a/system-test/mxs1926_killed_server.cpp b/system-test/mxs1926_killed_server.cpp index 07e1a709b..22c81a476 100644 --- a/system-test/mxs1926_killed_server.cpp +++ b/system-test/mxs1926_killed_server.cpp @@ -55,7 +55,7 @@ void tune_rowcount(TestConnections& test) int orig = ROWCOUNT; ROWCOUNT = orig / dur.count() * 10000; - test.tprintf("Loading %d rows took %d ms, setting row count to %d", + test.tprintf("Loading %d rows took %ld ms, setting row count to %d", orig, dur.count(), ROWCOUNT.load()); diff --git a/system-test/mxs1929_start_from_scratch.cpp b/system-test/mxs1929_start_from_scratch.cpp index 5c927454c..4ca6be8bb 100644 --- a/system-test/mxs1929_start_from_scratch.cpp +++ b/system-test/mxs1929_start_from_scratch.cpp @@ -120,7 +120,7 @@ int main(int argc, char** argv) auto end = std::chrono::steady_clock::now(); - test.tprintf("A total of %d connections were created over %d seconds", + test.tprintf("A total of %d connections were created over %ld seconds", conns.load(), std::chrono::duration_cast(end - start).count()); diff --git a/system-test/mxs812_1.cpp b/system-test/mxs812_1.cpp index 329bcdda9..b741aef3d 100644 --- a/system-test/mxs812_1.cpp +++ b/system-test/mxs812_1.cpp @@ -31,7 +31,7 @@ void run_test(TestConnections& test, size_t size, int chunks) mysql_stmt_error(stmt)); std::string data(size, '.'); - test.tprintf("Sending %d x %d bytes of data", size, chunks); + test.tprintf("Sending %zu x %d bytes of data", size, chunks); for (int i = 0; i < chunks; i++) {