diff options
author | Matthias Braun <matze@braunis.de> | 2016-08-16 18:28:55 +0000 |
---|---|---|
committer | Matthias Braun <matze@braunis.de> | 2016-08-16 18:28:55 +0000 |
commit | 319435db18405661444cac523e3e3c9fa2aabe97 (patch) | |
tree | a5b2abb33a97983bbb245bb6acba1081c2b78f06 | |
parent | b5fd586505a8be92d2a4ca2ac243e8a91b4f6b2d (diff) | |
download | compiler-rt-319435db18405661444cac523e3e3c9fa2aabe97.tar.gz |
sanitizer_common: Fix warning
Clang added warning that taking the address of a packed struct member
possibly yields an unaligned pointer. This case is benign because
the pointer gets casted to an uptr and not used for unaligned accesses.
Add an intermediate cast to char* until this warning is improved (see
also https://reviews.llvm.org/D20561)
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@278835 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc b/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc index 959c622a3..4ed9afedf 100644 --- a/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc +++ b/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc @@ -583,7 +583,8 @@ static void ioctl_common_pre(void *ctx, const ioctl_desc *desc, int d, return; if (request == IOCTL_SIOCGIFCONF) { struct __sanitizer_ifconf *ifc = (__sanitizer_ifconf *)arg; - COMMON_INTERCEPTOR_READ_RANGE(ctx, &ifc->ifc_len, sizeof(ifc->ifc_len)); + COMMON_INTERCEPTOR_READ_RANGE(ctx, (char*)&ifc->ifc_len, + sizeof(ifc->ifc_len)); } } |