summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Evans <jasone@canonware.com>2013-12-12 23:20:49 (GMT)
committerJason Evans <jasone@canonware.com>2013-12-12 23:20:49 (GMT)
commit0ac396a06a10f8a8c1d41c8771367625e7d49d07 (patch)
tree5c47edbde2365230c866a9522f513cf0b3f89a7d
parenta2be4779b19a491a5686cfda067f98d7d70a9056 (diff)
downloadjemalloc-0ac396a06a10f8a8c1d41c8771367625e7d49d07.zip
jemalloc-0ac396a06a10f8a8c1d41c8771367625e7d49d07.tar.gz
jemalloc-0ac396a06a10f8a8c1d41c8771367625e7d49d07.tar.bz2
Fix a strict aliasing violation.
-rw-r--r--test/unit/mq.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/unit/mq.c b/test/unit/mq.c
index f0f4990..01e72fd 100644
--- a/test/unit/mq.c
+++ b/test/unit/mq.c
@@ -53,8 +53,10 @@ thd_sender_start(void *arg)
for (i = 0; i < NMSGS; i++) {
mq_msg_t *msg;
- assert_d_eq(jet_allocm((void **)&msg, NULL, sizeof(mq_msg_t),
- 0), ALLOCM_SUCCESS, "Unexpected allocm() failure");
+ void *p;
+ assert_d_eq(jet_allocm(&p, NULL, sizeof(mq_msg_t), 0),
+ ALLOCM_SUCCESS, "Unexpected allocm() failure");
+ msg = (mq_msg_t *)p;
mq_put(mq, msg);
}
return (NULL);