From ac510d13c7dc964d1cd76365c57a336d96b18969 Mon Sep 17 00:00:00 2001 From: mio Date: Tue, 18 Jan 2022 21:37:32 +0100 Subject: [PATCH] Fix fuzzing and remove unused variable --- CMakeLists.txt | 4 +++- tests/fuzz/onedir.c | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e6d76cf2..3af86b3e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1254,7 +1254,9 @@ endif() if(UNICORN_FUZZ) set(UNICORN_FUZZ_SUFFIX "arm_arm;arm_armbe;arm_thumb;arm64_arm;arm64_armbe;m68k_be;mips_32be;mips_32le;sparc_32be;x86_16;x86_32;x86_64") - set(SAMPLES_LIB ${SAMPLES_LIB} rt) + if (NOT APPLE) + set(SAMPLES_LIB ${SAMPLES_LIB} rt) + endif() foreach(SUFFIX ${UNICORN_FUZZ_SUFFIX}) add_executable(fuzz_emu_${SUFFIX} ${CMAKE_CURRENT_SOURCE_DIR}/tests/fuzz/fuzz_emu_${SUFFIX}.c diff --git a/tests/fuzz/onedir.c b/tests/fuzz/onedir.c index 21f9a768..e0336c81 100644 --- a/tests/fuzz/onedir.c +++ b/tests/fuzz/onedir.c @@ -14,7 +14,6 @@ int main(int argc, char** argv) DIR *d; struct dirent *dir; int r = 0; - int i; if (argc != 2) { return 1;