aboutsummaryrefslogtreecommitdiff
path: root/linux/test_harness.h
diff options
context:
space:
mode:
Diffstat (limited to 'linux/test_harness.h')
-rw-r--r--linux/test_harness.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/linux/test_harness.h b/linux/test_harness.h
index 01e534e..037ff81 100644
--- a/linux/test_harness.h
+++ b/linux/test_harness.h
@@ -42,6 +42,7 @@
#define TEST_HARNESS_H_
#define _GNU_SOURCE
+#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -374,11 +375,8 @@
__typeof__(_expected) __exp = (_expected); \
__typeof__(_seen) __seen = (_seen); \
if (!(__exp _t __seen)) { \
- unsigned long long __exp_print = 0; \
- unsigned long long __seen_print = 0; \
- /* Avoid casting complaints the scariest way we can. */ \
- memcpy(&__exp_print, &__exp, sizeof(__exp)); \
- memcpy(&__seen_print, &__seen, sizeof(__seen)); \
+ unsigned long long __exp_print = (uintptr_t)__exp; \
+ unsigned long long __seen_print = (uintptr_t)__seen; \
__TH_LOG("Expected %s (%llu) %s %s (%llu)", \
#_expected, __exp_print, #_t, \
#_seen, __seen_print); \