From 282de37d5713d2a942589629d473559a95a8d51d Mon Sep 17 00:00:00 2001 From: Yevgen Muntyan <17531749+muntyan@users.noreply.github.com> Date: Sun, 20 Jan 2008 03:38:04 -0600 Subject: [PATCH] Cast string arguments to char* to avoid warnings about CU_assertImplementation --- moo/moo-tests-utils.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/moo/moo-tests-utils.h b/moo/moo-tests-utils.h index 71073ce9..f464d1bf 100644 --- a/moo/moo-tests-utils.h +++ b/moo/moo-tests-utils.h @@ -24,7 +24,8 @@ TEST_PASSED_OR_FAILEDV (gboolean passed, else msg = passed ? "Passed" : "Failed"; - CU_assertImplementation (passed, line, msg, file, "", FALSE); + CU_assertImplementation (passed, line, (char*) msg, + (char*) file, (char*) "", FALSE); g_free (freeme); } @@ -47,8 +48,8 @@ TEST_PASSED_OR_FAILED (gboolean passed, format, __VA_ARGS__) #define TEST_ASSERT(cond) \ - CU_assertImplementation (!!(cond), __LINE__, #cond, __FILE__, \ - "", FALSE) + CU_assertImplementation (!!(cond), __LINE__, (char*) #cond, \ + (char*) __FILE__, (char*) "", FALSE) #define TEST_ASSERT_CMP__(Type,actual,expected,cmp,fmt_arg,msg) \ G_STMT_START { \ @@ -183,6 +184,7 @@ G_STMT_START { \ #expr); \ } G_STMT_END + G_GNUC_UNUSED struct TestWarningsInfo { int count; int line;