Fix unused function warning w/o changing compiler flags.

We have way too many different build systems.

llvm-svn: 184409
This commit is contained in:
Evgeniy Stepanov 2013-06-20 09:45:36 +00:00
parent 274b6f0c87
commit 673cf23d06
2 changed files with 7 additions and 3 deletions

View File

@ -32,8 +32,7 @@ set(SANITIZER_TEST_CFLAGS_COMMON
-I${COMPILER_RT_SOURCE_DIR}/lib/sanitizer_common
-DGTEST_HAS_RTTI=0
-O2 -g -fno-rtti
-Wall -Werror -Werror=sign-compare
-Wno-unused-function)
-Wall -Werror -Werror=sign-compare)
set(SANITIZER_TEST_LINK_FLAGS_COMMON
-lstdc++ -ldl)

View File

@ -42,7 +42,12 @@ using namespace __sanitizer;
#include "sanitizer_common/sanitizer_common_interceptors_ioctl.inc"
static struct IoctlInit {
IoctlInit() { ioctl_init(); }
IoctlInit() {
ioctl_init();
// Avoid unused function warnings.
(void)&ioctl_common_pre;
(void)&ioctl_common_post;
}
} ioctl_static_initializer;
TEST(SanitizerIoctl, Fixup) {