提交 b5bb6d30 编写于 作者: K Kees Cook 提交者: Shuah Khan

selftests/seccomp: fix 32-bit build warnings

The casting was done incorrectly for 32-bit builds. Fixed to use uintptr_t.
Reported-by: NEric Adams <adamse@google.com>
Signed-off-by: NKees Cook <keescook@chromium.org>
Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
上级 cdf88b4f
......@@ -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); \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册