summaryrefslogtreecommitdiff
path: root/tests/test_config.c
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2012-05-07 18:51:44 +0000
committerRichard Mudgett <rmudgett@digium.com>2012-05-07 18:51:44 +0000
commit005cd92e78643d0476570713532bae8d3c9f0869 (patch)
treee966473b7b55bb96d265d852bafcdb2f22203e9d /tests/test_config.c
parent9e7de73fee610939df702a9f4a4a24a6693fb239 (diff)
Fix type punned compiler warning in test_config.c
........ Merged revisions 365476 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 365478 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@365479 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'tests/test_config.c')
-rw-r--r--tests/test_config.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/test_config.c b/tests/test_config.c
index 99a877e4e..1a58e46ff 100644
--- a/tests/test_config.c
+++ b/tests/test_config.c
@@ -59,19 +59,22 @@ enum {
ret = AST_TEST_FAIL; \
} else { \
if (((flags) & PARSE_TYPE) == PARSE_INT32) { \
- int32_t *r = (int32_t *) result, e = (int32_t) expected_result; \
+ int32_t *r = (int32_t *) (void *) result; \
+ int32_t e = (int32_t) expected_result; \
if (*r != e) { \
ast_test_status_update(test, "ast_parse_arg int32_t failed with %d != %d\n", *r, e); \
ret = AST_TEST_FAIL; \
} \
} else if (((flags) & PARSE_TYPE) == PARSE_UINT32) { \
- uint32_t *r = (uint32_t *) result, e = (uint32_t) expected_result; \
+ uint32_t *r = (uint32_t *) (void *) result; \
+ uint32_t e = (uint32_t) expected_result; \
if (*r != e) { \
ast_test_status_update(test, "ast_parse_arg uint32_t failed with %u != %u\n", *r, e); \
ret = AST_TEST_FAIL; \
} \
} else if (((flags) & PARSE_TYPE) == PARSE_DOUBLE) { \
- double *r = (double *) result, e = (double) expected_result; \
+ double *r = (double *) (void *) result; \
+ double e = (double) expected_result; \
if (fabs(*r - e) > EPSILON) { \
ast_test_status_update(test, "ast_parse_arg double failed with %f != %f\n", *r, e); \
ret = AST_TEST_FAIL; \