From a638c963f664b27e0e00d783381ea42170eff8b8 Mon Sep 17 00:00:00 2001 From: Aiden Woodruff Date: Fri, 5 Jan 2024 15:05:02 -0500 Subject: [PATCH] Fix capVol CMake and compiler warnings Remove partial support for -- to end command line option processing - This did not make sense anyway since the final two arguments are never processed. Make the include_directories PRIVATE to the executable target Signed-off-by: Aiden Woodruff --- test/CMakeLists.txt | 2 +- test/capVol.cc | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 95100aa5b..2495c0567 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -211,7 +211,7 @@ endif() if(ENABLE_CAPSTONE) util_exe_func(capVol capVol.cc) - target_include_directories(capVol PUBLIC "${PROJECT_SOURCE_DIR}/capstone_clis") + target_include_directories(capVol PRIVATE "${PROJECT_SOURCE_DIR}/capstone_clis") endif() # send all the newly added utility executable targets diff --git a/test/capVol.cc b/test/capVol.cc index 5eaa0b52c..a9149c585 100644 --- a/test/capVol.cc +++ b/test/capVol.cc @@ -95,13 +95,9 @@ int main(int argc, char** argv) { bool volume_flag = false, write_flag = false, analytic_flag = false, verbose_flag = false; for (int i = 1; i < argc - 2; ++i) { - bool flagDone = false; if (*argv[i] == '-') { for (int j = 1; argv[i][j] != '\0'; ++j) { switch(argv[i][j]) { - case '-': - flagDone = true; - break; case 'a': analytic_flag = true; break;