dovecot-2.2: Make static analyzer happier.
dovecot at dovecot.org
dovecot at dovecot.org
Fri Apr 5 15:17:35 EEST 2013
details: http://hg.dovecot.org/dovecot-2.2/rev/83568daabff6
changeset: 16206:83568daabff6
user: Timo Sirainen <tss at iki.fi>
date: Fri Apr 05 15:17:30 2013 +0300
description:
Make static analyzer happier.
diffstat:
src/doveadm/dsync/doveadm-dsync.c | 2 +-
src/doveadm/dsync/dsync-mailbox-export.c | 6 ++----
src/doveadm/dsync/dsync-mailbox-import.c | 2 ++
src/lib-http/http-client-request.c | 2 ++
src/lib/test-json-parser.c | 1 +
5 files changed, 8 insertions(+), 5 deletions(-)
diffs (66 lines):
diff -r 2918bfacf565 -r 83568daabff6 src/doveadm/dsync/doveadm-dsync.c
--- a/src/doveadm/dsync/doveadm-dsync.c Fri Apr 05 14:05:54 2013 +0300
+++ b/src/doveadm/dsync/doveadm-dsync.c Fri Apr 05 15:17:30 2013 +0300
@@ -450,7 +450,7 @@
struct mail_namespace *sync_ns = NULL;
enum dsync_brain_flags brain_flags;
bool remote_errors_logged = FALSE;
- int status, ret = 0;
+ int status = 0, ret = 0;
user->admin = TRUE;
user->dsyncing = TRUE;
diff -r 2918bfacf565 -r 83568daabff6 src/doveadm/dsync/dsync-mailbox-export.c
--- a/src/doveadm/dsync/dsync-mailbox-export.c Fri Apr 05 14:05:54 2013 +0300
+++ b/src/doveadm/dsync/dsync-mailbox-export.c Fri Apr 05 15:17:30 2013 +0300
@@ -481,13 +481,11 @@
static int
dsync_mailbox_export_iter_next_nonexistent_attr(struct dsync_mailbox_exporter *exporter)
{
- HASH_TABLE_TYPE(dsync_attr_change) attr_changes;
struct dsync_mailbox_attribute *attr;
struct mail_attribute_value value;
- attr_changes = dsync_transaction_log_scan_get_attr_hash(exporter->log_scan);
-
- while (hash_table_iterate(exporter->attr_change_iter, attr_changes,
+ while (hash_table_iterate(exporter->attr_change_iter,
+ dsync_transaction_log_scan_get_attr_hash(exporter->log_scan),
&attr, &attr)) {
if (attr->exported || !attr->deleted)
continue;
diff -r 2918bfacf565 -r 83568daabff6 src/doveadm/dsync/dsync-mailbox-import.c
--- a/src/doveadm/dsync/dsync-mailbox-import.c Fri Apr 05 14:05:54 2013 +0300
+++ b/src/doveadm/dsync/dsync-mailbox-import.c Fri Apr 05 15:17:30 2013 +0300
@@ -1656,6 +1656,8 @@
const char *request_guid = NULL;
uint32_t request_uid = 0;
+ i_assert(all_newmails != NULL);
+
/* get the list of the current local UIDs and the wanted UIDs.
find the first remote instance that we can request in case there are
no local instances */
diff -r 2918bfacf565 -r 83568daabff6 src/lib-http/http-client-request.c
--- a/src/lib-http/http-client-request.c Fri Apr 05 14:05:54 2013 +0300
+++ b/src/lib-http/http-client-request.c Fri Apr 05 15:17:30 2013 +0300
@@ -218,6 +218,8 @@
static void
http_client_request_finish_payload_out(struct http_client_request *req)
{
+ i_assert(req->conn != NULL);
+
if (req->payload_output != NULL) {
o_stream_unref(&req->payload_output);
req->payload_output = NULL;
diff -r 2918bfacf565 -r 83568daabff6 src/lib/test-json-parser.c
--- a/src/lib/test-json-parser.c Fri Apr 05 14:05:54 2013 +0300
+++ b/src/lib/test-json-parser.c Fri Apr 05 15:17:30 2013 +0300
@@ -128,6 +128,7 @@
test_istream_set_size(input, i);
for (;;) {
+ value = NULL;
if (pos < N_ELEMENTS(json_output) &&
json_output[pos].type == (enum json_type)TYPE_SKIP) {
json_parse_skip_next(parser);
More information about the dovecot-cvs
mailing list