From: Andre Noll Date: Thu, 1 Jan 2015 22:30:30 +0000 (+0000) Subject: Remove some unused error codes. X-Git-Tag: v0.5.4~29 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=764933011fb465b687be94abee74f4fbca9b6884;hp=06cf1943be32153d075ea90a5da12ac93ab2e90a Remove some unused error codes. Although E_AMP_SYNTAX and E_PREBUFFER_SYNTAX are assigned to a variable, in both cases the variable is set to a different value later without being used in between (detected by cppcheck). --- diff --git a/amp_filter.c b/amp_filter.c index e43e45f7..0b0cddbf 100644 --- a/amp_filter.c +++ b/amp_filter.c @@ -34,7 +34,7 @@ static void amp_close(struct filter_node *fn) static int amp_parse_config(int argc, char **argv, void **config) { struct amp_filter_args_info *conf = para_calloc(sizeof(*conf)); - int ret = -E_AMP_SYNTAX; + int ret; amp_filter_cmdline_parser(argc, argv, conf); ret = -ERRNO_TO_PARA_ERROR(EINVAL); diff --git a/error.h b/error.h index 13f4f7c4..08fa8866 100644 --- a/error.h +++ b/error.h @@ -161,7 +161,6 @@ extern const char **para_errlist[]; #define PREBUFFER_FILTER_ERRORS \ - PARA_ERROR(PREBUFFER_SYNTAX, "syntax error in prebuffer filter config"), \ PARA_ERROR(PREBUFFER_SUCCESS, "prebuffering complete"), \ @@ -210,7 +209,6 @@ extern const char **para_errlist[]; #define AMP_FILTER_ERRORS \ - PARA_ERROR(AMP_SYNTAX, "syntax error in amp filter config"), \ PARA_ERROR(AMP_ZERO_AMP, "no amplification necessary"), \ PARA_ERROR(AMP_EOF, "amp: end of file"), \ @@ -259,7 +257,6 @@ extern const char **para_errlist[]; #define BLOB_ERRORS \ PARA_ERROR(BLOB_SYNTAX, "blob syntax error"), \ - PARA_ERROR(INPUT_TOO_LARGE, "input too large for stdin command"), \ #define PLAYLIST_ERRORS \ @@ -301,7 +298,6 @@ extern const char **para_errlist[]; PARA_ERROR(CLIENT_SYNTAX, "syntax error"), \ PARA_ERROR(NO_CONFIG, "config file not found"), \ PARA_ERROR(BAD_CONFIG, "syntax error in config file"), \ - PARA_ERROR(CLIENT_AUTH, "authentication failed"), \ PARA_ERROR(SERVER_EOF, "connection closed by para_server"), \ PARA_ERROR(SERVER_CMD_SUCCESS, "command terminated successfully"), \ PARA_ERROR(SERVER_CMD_FAILURE, "command failed"), \ diff --git a/prebuffer_filter.c b/prebuffer_filter.c index 17a5b616..8f1a9fae 100644 --- a/prebuffer_filter.c +++ b/prebuffer_filter.c @@ -77,7 +77,7 @@ static int prebuffer_post_select(__a_unused struct sched *s, void *context) static int prebuffer_parse_config(int argc, char **argv, void **config) { struct prebuffer_filter_args_info *conf = para_calloc(sizeof(*conf)); - int ret = -E_PREBUFFER_SYNTAX; + int ret; prebuffer_filter_cmdline_parser(argc, argv, conf); ret = -ERRNO_TO_PARA_ERROR(EINVAL);