dovecot-2.2-pigeonhole: Fixed several problems reported by CLang...
pigeonhole at rename-it.nl
pigeonhole at rename-it.nl
Thu May 15 17:51:51 UTC 2014
details: http://hg.rename-it.nl/dovecot-2.2-pigeonhole/rev/6a0376f1a7d2
changeset: 1864:6a0376f1a7d2
user: Stephan Bosch <stephan at rename-it.nl>
date: Thu May 15 19:48:27 2014 +0200
description:
Fixed several problems reported by CLang 3.4.
diffstat:
src/lib-sieve/sieve-parser.c | 18 ------------------
src/lib-sieve/sieve.c | 2 +-
src/lib-sieve/util/edit-mail.c | 16 +---------------
src/testsuite/testsuite-script.c | 2 +-
4 files changed, 3 insertions(+), 35 deletions(-)
diffs (92 lines):
diff -r 689db87e26f2 -r 6a0376f1a7d2 src/lib-sieve/sieve-parser.c
--- a/src/lib-sieve/sieve-parser.c Mon May 12 21:27:13 2014 +0200
+++ b/src/lib-sieve/sieve-parser.c Thu May 15 19:48:27 2014 +0200
@@ -19,8 +19,6 @@
inline static void sieve_parser_error
(struct sieve_parser *parser, const char *fmt, ...) ATTR_FORMAT(2, 3);
-inline static void sieve_parser_warning
- (struct sieve_parser *parser, const char *fmt, ...) ATTR_FORMAT(2, 3);
static int sieve_parser_recover
(struct sieve_parser *parser, enum sieve_token_type end_token);
@@ -114,22 +112,6 @@
va_end(args);
}
-inline static void sieve_parser_warning
-(struct sieve_parser *parser, const char *fmt, ...)
-{
- va_list args;
- va_start(args, fmt);
-
- T_BEGIN {
- sieve_vwarning(parser->ehandler,
- sieve_error_script_location(parser->script,
- sieve_lexer_token_line(parser->lexer)),
- fmt, args);
- } T_END;
-
- va_end(args);
-}
-
/*
* Sieve grammar parsing
*/
diff -r 689db87e26f2 -r 6a0376f1a7d2 src/lib-sieve/sieve.c
--- a/src/lib-sieve/sieve.c Mon May 12 21:27:13 2014 +0200
+++ b/src/lib-sieve/sieve.c Thu May 15 19:48:27 2014 +0200
@@ -274,7 +274,7 @@
sieve_ast_unref(&ast);
if ( error_r != NULL )
- error_r = SIEVE_ERROR_NONE;
+ *error_r = SIEVE_ERROR_NONE;
return sbin;
}
diff -r 689db87e26f2 -r 6a0376f1a7d2 src/lib-sieve/util/edit-mail.c
--- a/src/lib-sieve/util/edit-mail.c Mon May 12 21:27:13 2014 +0200
+++ b/src/lib-sieve/util/edit-mail.c Thu May 15 19:48:27 2014 +0200
@@ -851,7 +851,7 @@
if ( index >= 0 ) {
pos++;
final = ( header_idx->last == field_idx );
- } else if ( index < 0 ) {
+ } else {
pos--;
final = ( header_idx->first == field_idx );
}
@@ -945,20 +945,6 @@
*edhiter = NULL;
}
-static inline string_t *_header_right_trim(const char *raw)
-{
- string_t *result;
- int i;
-
- for ( i = strlen(raw)-1; i >= 0; i-- ) {
- if ( raw[i] != ' ' && raw[i] != '\t' ) break;
- }
-
- result = t_str_new(i+1);
- str_append_n(result, raw, i + 1);
- return result;
-}
-
void edit_mail_headers_iterate_get
(struct edit_mail_header_iter *edhiter, const char **value_r)
{
diff -r 689db87e26f2 -r 6a0376f1a7d2 src/testsuite/testsuite-script.c
--- a/src/testsuite/testsuite-script.c Mon May 12 21:27:13 2014 +0200
+++ b/src/testsuite/testsuite-script.c Thu May 15 19:48:27 2014 +0200
@@ -42,7 +42,7 @@
script_path = sieve_file_script_get_dirpath(renv->script);
if ( script_path == NULL )
- return SIEVE_EXEC_FAILURE;
+ return NULL;
script_path = t_strconcat(script_path, "/", script, NULL);
More information about the dovecot-cvs
mailing list