Remove unused variables
Project: http://git-wip-us.apache.org/repos/asf/lucy-charmonizer/repo Commit: http://git-wip-us.apache.org/repos/asf/lucy-charmonizer/commit/a60bab7f Tree: http://git-wip-us.apache.org/repos/asf/lucy-charmonizer/tree/a60bab7f Diff: http://git-wip-us.apache.org/repos/asf/lucy-charmonizer/diff/a60bab7f Branch: refs/heads/master Commit: a60bab7f0844b0b632d428b56c48a43cfa31351f Parents: 90e0a8c Author: Nick Wellnhofer <[email protected]> Authored: Sun Feb 1 22:53:57 2015 +0100 Committer: Nick Wellnhofer <[email protected]> Committed: Sun Feb 1 22:53:57 2015 +0100 ---------------------------------------------------------------------- src/Charmonizer/Core/CLI.c | 1 - src/Charmonizer/Probe.c | 1 - src/Charmonizer/Probe/DirManip.c | 2 -- src/Charmonizer/Probe/Integers.c | 1 - src/Charmonizer/Probe/Memory.c | 17 +++-------------- src/Charmonizer/Probe/VariadicMacros.c | 6 +----- 6 files changed, 4 insertions(+), 24 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lucy-charmonizer/blob/a60bab7f/src/Charmonizer/Core/CLI.c ---------------------------------------------------------------------- diff --git a/src/Charmonizer/Core/CLI.c b/src/Charmonizer/Core/CLI.c index b913c66..78678af 100644 --- a/src/Charmonizer/Core/CLI.c +++ b/src/Charmonizer/Core/CLI.c @@ -304,7 +304,6 @@ chaz_CLI_parse(chaz_CLI *self, int argc, const char *argv[]) { for (i = 1; i < argc; i++) { const char *arg = argv[i]; size_t name_len = 0; - int has_equals = 0; const char *value = NULL; /* Stop processing if we see `-` or `--`. */ http://git-wip-us.apache.org/repos/asf/lucy-charmonizer/blob/a60bab7f/src/Charmonizer/Probe.c ---------------------------------------------------------------------- diff --git a/src/Charmonizer/Probe.c b/src/Charmonizer/Probe.c index 83b0e25..d282b08 100644 --- a/src/Charmonizer/Probe.c +++ b/src/Charmonizer/Probe.c @@ -34,7 +34,6 @@ int chaz_Probe_parse_cli_args(int argc, const char *argv[], chaz_CLI *cli) { int i; - int output_enabled = 0; /* Register Charmonizer-specific options. */ chaz_CLI_register(cli, "enable-c", "generate charmony.h", CHAZ_CLI_NO_ARG); http://git-wip-us.apache.org/repos/asf/lucy-charmonizer/blob/a60bab7f/src/Charmonizer/Probe/DirManip.c ---------------------------------------------------------------------- diff --git a/src/Charmonizer/Probe/DirManip.c b/src/Charmonizer/Probe/DirManip.c index c6465d7..c737f22 100644 --- a/src/Charmonizer/Probe/DirManip.c +++ b/src/Charmonizer/Probe/DirManip.c @@ -120,7 +120,6 @@ chaz_DirManip_try_rmdir(void) { void chaz_DirManip_run(void) { const char *dir_sep = chaz_OS_dir_sep(); - int remove_zaps_dirs = false; int has_dirent_h = chaz_HeadCheck_check_header("dirent.h"); int has_direct_h = chaz_HeadCheck_check_header("direct.h"); int has_dirent_d_namlen = false; @@ -192,7 +191,6 @@ chaz_DirManip_run(void) { /* See whether remove works on directories. */ chaz_OS_mkdir("_charm_test_remove_me"); if (0 == remove("_charm_test_remove_me")) { - remove_zaps_dirs = true; chaz_ConfWriter_add_def("REMOVE_ZAPS_DIRS", NULL); } chaz_OS_rmdir("_charm_test_remove_me"); http://git-wip-us.apache.org/repos/asf/lucy-charmonizer/blob/a60bab7f/src/Charmonizer/Probe/Integers.c ---------------------------------------------------------------------- diff --git a/src/Charmonizer/Probe/Integers.c b/src/Charmonizer/Probe/Integers.c index aec09b5..e417674 100644 --- a/src/Charmonizer/Probe/Integers.c +++ b/src/Charmonizer/Probe/Integers.c @@ -89,7 +89,6 @@ chaz_Integers_run(void) { int has___int64 = false; int has_inttypes = chaz_HeadCheck_check_header("inttypes.h"); int has_stdint = chaz_HeadCheck_check_header("stdint.h"); - int can_convert_u64_to_double = true; char i32_t_type[10]; char i32_t_postfix[10]; char u32_t_postfix[10]; http://git-wip-us.apache.org/repos/asf/lucy-charmonizer/blob/a60bab7f/src/Charmonizer/Probe/Memory.c ---------------------------------------------------------------------- diff --git a/src/Charmonizer/Probe/Memory.c b/src/Charmonizer/Probe/Memory.c index 947f212..71d6924 100644 --- a/src/Charmonizer/Probe/Memory.c +++ b/src/Charmonizer/Probe/Memory.c @@ -44,13 +44,8 @@ chaz_Memory_probe_alloca(void) { CHAZ_QUOTE( void *foo = %s(1); ) CHAZ_QUOTE( return 0; ) CHAZ_QUOTE( } ); - int has_sys_mman_h = false; - int has_alloca_h = false; - int has_malloc_h = false; - int need_stdlib_h = false; int has_alloca = false; int has_builtin_alloca = false; - int has_underscore_alloca = false; char code_buf[sizeof(alloca_code) + 100]; { @@ -63,7 +58,6 @@ chaz_Memory_probe_alloca(void) { NULL }; if (chaz_HeadCheck_check_many_headers((const char**)mman_headers)) { - has_sys_mman_h = true; chaz_ConfWriter_add_def("HAS_SYS_MMAN_H", NULL); } } @@ -71,8 +65,7 @@ chaz_Memory_probe_alloca(void) { /* Unixen. */ sprintf(code_buf, alloca_code, "alloca.h", "alloca"); if (chaz_CC_test_compile(code_buf)) { - has_alloca_h = true; - has_alloca = true; + has_alloca = true; chaz_ConfWriter_add_def("HAS_ALLOCA_H", NULL); chaz_ConfWriter_add_def("alloca", "alloca"); } @@ -84,8 +77,7 @@ chaz_Memory_probe_alloca(void) { */ sprintf(code_buf, alloca_code, "stdlib.h", "alloca"); if (chaz_CC_test_compile(code_buf)) { - has_alloca = true; - need_stdlib_h = true; + has_alloca = true; chaz_ConfWriter_add_def("ALLOCA_IN_STDLIB_H", NULL); chaz_ConfWriter_add_def("alloca", "alloca"); } @@ -103,8 +95,7 @@ chaz_Memory_probe_alloca(void) { if (!(has_alloca || has_builtin_alloca)) { sprintf(code_buf, alloca_code, "malloc.h", "alloca"); if (chaz_CC_test_compile(code_buf)) { - has_malloc_h = true; - has_alloca = true; + has_alloca = true; chaz_ConfWriter_add_def("HAS_MALLOC_H", NULL); chaz_ConfWriter_add_def("alloca", "alloca"); } @@ -112,8 +103,6 @@ chaz_Memory_probe_alloca(void) { if (!(has_alloca || has_builtin_alloca)) { sprintf(code_buf, alloca_code, "malloc.h", "_alloca"); if (chaz_CC_test_compile(code_buf)) { - has_malloc_h = true; - has_underscore_alloca = true; chaz_ConfWriter_add_def("HAS_MALLOC_H", NULL); chaz_ConfWriter_add_def("chy_alloca", "_alloca"); } http://git-wip-us.apache.org/repos/asf/lucy-charmonizer/blob/a60bab7f/src/Charmonizer/Probe/VariadicMacros.c ---------------------------------------------------------------------- diff --git a/src/Charmonizer/Probe/VariadicMacros.c b/src/Charmonizer/Probe/VariadicMacros.c index 04dfa44..d6f2d9f 100644 --- a/src/Charmonizer/Probe/VariadicMacros.c +++ b/src/Charmonizer/Probe/VariadicMacros.c @@ -46,9 +46,7 @@ void chaz_VariadicMacros_run(void) { char *output; size_t output_len; - int has_varmacros = false; - int has_iso_varmacros = false; - int has_gnuc_varmacros = false; + int has_varmacros = false; chaz_ConfWriter_start_module("VariadicMacros"); @@ -56,7 +54,6 @@ chaz_VariadicMacros_run(void) { output = chaz_CC_capture_output(chaz_VariadicMacros_iso_code, &output_len); if (output != NULL) { has_varmacros = true; - has_iso_varmacros = true; chaz_ConfWriter_add_def("HAS_VARIADIC_MACROS", NULL); chaz_ConfWriter_add_def("HAS_ISO_VARIADIC_MACROS", NULL); free(output); @@ -65,7 +62,6 @@ chaz_VariadicMacros_run(void) { /* Test for GNU-style variadic macros. */ output = chaz_CC_capture_output(chaz_VariadicMacros_gnuc_code, &output_len); if (output != NULL) { - has_gnuc_varmacros = true; if (has_varmacros == false) { has_varmacros = true; chaz_ConfWriter_add_def("HAS_VARIADIC_MACROS", NULL);
