From b5b2276b2a508c7f8bf9a9235a52ccd90c9f8df9 Mon Sep 17 00:00:00 2001 From: tsutsumi <> Date: Sat, 14 Aug 2010 09:18:12 +0000 Subject: [PATCH] suppress warning about lvalue assignment. --- src/ccunit/CCUnitConfig.h | 2 +- src/ccunit/CCUnitTestCase.c | 4 ++-- src/ccunit/CCUnitTestFailure.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/ccunit/CCUnitConfig.h b/src/ccunit/CCUnitConfig.h index a900a3d..88d38ad 100644 --- a/src/ccunit/CCUnitConfig.h +++ b/src/ccunit/CCUnitConfig.h @@ -57,7 +57,7 @@ * Omits dmalloc's free(NULL) warning. * @param p [in/out] pointer to free. and set NULL. */ -#define safe_free(p) (!p ? NULL : (free (p), p = NULL)) +#define safe_free(p) (!p ? NULL : (free ((void*)p), (p) = NULL)) /** * safty strdup. Tries not to pass NULL to strdup. diff --git a/src/ccunit/CCUnitTestCase.c b/src/ccunit/CCUnitTestCase.c index 4e8be5a..fa5fb36 100755 --- a/src/ccunit/CCUnitTestCase.c +++ b/src/ccunit/CCUnitTestCase.c @@ -55,8 +55,8 @@ void ccunit_deleteTestCase (CCUnitTestCase* testCase) { if (!testCase) return; - safe_free ((char*)testCase->name); - safe_free ((char*)testCase->desc); + safe_free (testCase->name); + safe_free (testCase->desc); free (testCase); } diff --git a/src/ccunit/CCUnitTestFailure.c b/src/ccunit/CCUnitTestFailure.c index 8cfe701..8e68131 100644 --- a/src/ccunit/CCUnitTestFailure.c +++ b/src/ccunit/CCUnitTestFailure.c @@ -48,8 +48,8 @@ CCUnitTestFailure* ccunit_newTestFailure (const char* file, void ccunit_deleteTestFailure (CCUnitTestFailure* failure) { - safe_free ((char*)failure->expect); - safe_free ((char*)failure->actual); + safe_free (failure->expect); + safe_free (failure->actual); safe_free (failure); } -- 2.11.0