dovecot-2.2: lib-http: Compiler warning fixes
dovecot at dovecot.org
dovecot at dovecot.org
Sat Nov 24 00:33:06 EET 2012
details: http://hg.dovecot.org/dovecot-2.2/rev/fa32c5f9cf71
changeset: 15395:fa32c5f9cf71
user: Timo Sirainen <tss at iki.fi>
date: Sat Nov 24 00:32:56 2012 +0200
description:
lib-http: Compiler warning fixes
diffstat:
src/lib-http/Makefile.am | 22 +--------------------
src/lib-http/http-client-host.c | 3 +-
src/lib-http/test-http-responses.c | 39 --------------------------------------
3 files changed, 2 insertions(+), 62 deletions(-)
diffs (98 lines):
diff -r 107c8b2c9594 -r fa32c5f9cf71 src/lib-http/Makefile.am
--- a/src/lib-http/Makefile.am Sat Nov 24 00:30:14 2012 +0200
+++ b/src/lib-http/Makefile.am Sat Nov 24 00:32:56 2012 +0200
@@ -40,7 +40,7 @@
test-http-response-parser \
test-http-client
-noinst_PROGRAMS = $(test_programs) test-http-responses
+noinst_PROGRAMS = $(test_programs)
test_libs = \
../lib-test/libtest.la \
@@ -97,26 +97,6 @@
../lib-ssl-iostream/libssl_iostream.la \
$(test_deps)
-test_http_responses_SOURCES = test-http-responses.c
-test_http_responses_LDADD = \
- http-date.lo \
- http-parser.lo \
- http-header-parser.lo \
- http-transfer-chunked.lo \
- http-response-parser.lo \
- ../lib/liblib.la \
- ../lib/safe-memset.lo \
- $(MODULE_LIBS)
-test_http_responses_DEPENDENCIES = \
- http-date.lo \
- http-parser.lo \
- http-header-parser.lo \
- http-transfer-chunked.lo \
- http-response-parser.lo \
- $(noinst_LTLIBRARIES) \
- ../lib/liblib.la \
- ../lib/safe-memset.lo
-
check: check-am check-test
check-test: all-am
for bin in $(test_programs); do \
diff -r 107c8b2c9594 -r fa32c5f9cf71 src/lib-http/http-client-host.c
--- a/src/lib-http/http-client-host.c Sat Nov 24 00:30:14 2012 +0200
+++ b/src/lib-http/http-client-host.c Sat Nov 24 00:32:56 2012 +0200
@@ -109,11 +109,10 @@
array_foreach_modifiable(queue, req_idx) {
if (*req_idx == req) {
idx = array_foreach_idx(queue, req_idx);
+ array_delete(queue, idx, 1);
break;
}
}
-
- array_delete(queue, idx, 1);
}
/*
diff -r 107c8b2c9594 -r fa32c5f9cf71 src/lib-http/test-http-responses.c
--- a/src/lib-http/test-http-responses.c Sat Nov 24 00:30:14 2012 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-/* Copyright (c) 2012 Dovecot authors, see the included COPYING file */
-
-#include "test-lib.h"
-#include "buffer.h"
-#include "str.h"
-#include "str-sanitize.h"
-#include "istream.h"
-#include "ostream.h"
-#include "test-common.h"
-#include "http-response-parser.h"
-
-#include <stdio.h>
-
-// FIXME: debug tool; can be removed
-
-int main(int argc, char **argv)
-{
- struct istream *input;
- struct http_response_parser *parser;
- struct http_response *response;
- const char *payload, *error = NULL;
- int ret;
-
- if (argc < 2)
- return 1;
-
- input = i_stream_create_file(argv[1], 32);
- parser = http_response_parser_init(input);
-
- payload = NULL;
- while ((ret=http_response_parse_next(parser, FALSE, &response, &error)) > 0) {
- printf("RESPONSE: %u %s\n", response->status, response->reason);
- }
-
- printf("RET: %d %s\n", ret, error);
-
- http_response_parser_deinit(&parser);
-}
-
More information about the dovecot-cvs
mailing list