aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2015-12-10 17:50:25 -0500
committerShuah Khan <shuahkh@osg.samsung.com>2016-01-07 15:40:20 -0500
commitb5bb6d3068eabb075ee7db09c73374f6db73ff4a (patch)
treee22cee15c4d6eaf110d500f073a0fe98e472034b /tools
parentcdf88b4f45142f7c85a934f05b55a6c08e1d2414 (diff)
selftests/seccomp: fix 32-bit build warnings
The casting was done incorrectly for 32-bit builds. Fixed to use uintptr_t. Reported-by: Eric Adams <adamse@google.com> Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/testing/selftests/seccomp/test_harness.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/testing/selftests/seccomp/test_harness.h b/tools/testing/selftests/seccomp/test_harness.h
index fb2841601f2f..a786c69c7584 100644
--- a/tools/testing/selftests/seccomp/test_harness.h
+++ b/tools/testing/selftests/seccomp/test_harness.h
@@ -42,6 +42,7 @@
42#define TEST_HARNESS_H_ 42#define TEST_HARNESS_H_
43 43
44#define _GNU_SOURCE 44#define _GNU_SOURCE
45#include <stdint.h>
45#include <stdio.h> 46#include <stdio.h>
46#include <stdlib.h> 47#include <stdlib.h>
47#include <string.h> 48#include <string.h>
@@ -370,8 +371,8 @@
370 __typeof__(_expected) __exp = (_expected); \ 371 __typeof__(_expected) __exp = (_expected); \
371 __typeof__(_seen) __seen = (_seen); \ 372 __typeof__(_seen) __seen = (_seen); \
372 if (!(__exp _t __seen)) { \ 373 if (!(__exp _t __seen)) { \
373 unsigned long long __exp_print = (unsigned long long)__exp; \ 374 unsigned long long __exp_print = (uintptr_t)__exp; \
374 unsigned long long __seen_print = (unsigned long long)__seen; \ 375 unsigned long long __seen_print = (uintptr_t)__seen; \
375 __TH_LOG("Expected %s (%llu) %s %s (%llu)", \ 376 __TH_LOG("Expected %s (%llu) %s %s (%llu)", \
376 #_expected, __exp_print, #_t, \ 377 #_expected, __exp_print, #_t, \
377 #_seen, __seen_print); \ 378 #_seen, __seen_print); \