From 5279d519f8e98d6a134e77b54669512f618672bd Mon Sep 17 00:00:00 2001 From: ntfreak Date: Mon, 25 Feb 2008 20:18:26 +0000 Subject: - remove build warnings git-svn-id: svn://svn.berlios.de/openocd/trunk@348 b42882b7-edfa-0310-969c-e2dbd0fdcd60 --- src/helper/configuration.c | 2 -- src/helper/configuration.h | 2 ++ src/helper/log.c | 2 +- src/helper/options.c | 4 ---- 4 files changed, 3 insertions(+), 7 deletions(-) (limited to 'src/helper') diff --git a/src/helper/configuration.c b/src/helper/configuration.c index 9b9c1816..abbcbfcb 100644 --- a/src/helper/configuration.c +++ b/src/helper/configuration.c @@ -36,7 +36,6 @@ static char** config_file_names; static size_t num_script_dirs; static char** script_search_dirs; - void add_script_search_dir (const char *dir) { num_script_dirs++; @@ -87,7 +86,6 @@ FILE *open_file_from_path (command_context_t *cmd_ctx, char *file, char *mode) int parse_config_file(struct command_context_s *cmd_ctx) { char **cfg; - FILE *config_file; if (!config_file_names) add_config_file_name ("script openocd.cfg"); diff --git a/src/helper/configuration.h b/src/helper/configuration.h index ec6e5539..f4aa8c0a 100644 --- a/src/helper/configuration.h +++ b/src/helper/configuration.h @@ -25,6 +25,8 @@ extern int parse_cmdline_args(struct command_context_s *cmd_ctx, int argc, char *argv[]); extern int parse_config_file(struct command_context_s *cmd_ctx); +extern void add_config_file_name (const char *cfg); +extern void add_script_search_dir (const char *dir); extern int configuration_output_handler(struct command_context_s *context, char* line); extern FILE *open_file_from_path (command_context_t *cmd_ctx, char *file, char *mode); diff --git a/src/helper/log.c b/src/helper/log.c index 861e4b37..a5432aa9 100644 --- a/src/helper/log.c +++ b/src/helper/log.c @@ -197,7 +197,7 @@ int log_remove_callback(log_callback_fn fn, void *priv) { log_callback_t *cb, **p; - for (p = &log_callbacks; cb = *p; p = &(*p)->next) + for (p = &log_callbacks; (cb = *p); p = &(*p)->next) { if (cb->fn == fn && cb->priv == priv) { diff --git a/src/helper/options.c b/src/helper/options.c index 89bf1f9b..30dad17d 100644 --- a/src/helper/options.c +++ b/src/helper/options.c @@ -31,7 +31,6 @@ #include #include - static int help_flag; static struct option long_options[] = @@ -47,8 +46,6 @@ static struct option long_options[] = {0, 0, 0, 0} }; - - int configuration_output_handler(struct command_context_s *context, char* line) { INFO(line); @@ -56,7 +53,6 @@ int configuration_output_handler(struct command_context_s *context, char* line) return ERROR_OK; } - int parse_cmdline_args(struct command_context_s *cmd_ctx, int argc, char *argv[]) { int c; -- cgit v1.2.3