diff options
author | Kees Cook <keescook@chromium.org> | 2015-12-10 14:50:25 -0800 |
---|---|---|
committer | Shuah Khan <shuahkh@osg.samsung.com> | 2016-01-07 13:40:20 -0700 |
commit | d9fdb8c0b554532b30e1b5825202d40547bea139 (patch) | |
tree | bbef8f368b928646140a5f1f6f0533aff72ee1f0 | |
parent | 7a774edb86773ad2cbea039d43e5ef2fd9990467 (diff) | |
download | platform_external_seccomp-tests-d9fdb8c0b554532b30e1b5825202d40547bea139.tar.gz platform_external_seccomp-tests-d9fdb8c0b554532b30e1b5825202d40547bea139.tar.bz2 platform_external_seccomp-tests-d9fdb8c0b554532b30e1b5825202d40547bea139.zip |
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>
-rw-r--r-- | test_harness.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test_harness.h b/test_harness.h index fb28416..a786c69 100644 --- a/test_harness.h +++ b/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> @@ -370,8 +371,8 @@ __typeof__(_expected) __exp = (_expected); \ __typeof__(_seen) __seen = (_seen); \ if (!(__exp _t __seen)) { \ - unsigned long long __exp_print = (unsigned long long)__exp; \ - unsigned long long __seen_print = (unsigned long long)__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); \ |