From 3e13a4112af5136b08c4888f627151baee6a1aee Mon Sep 17 00:00:00 2001 From: Sergey Poznyakoff Date: Tue, 5 Oct 2010 15:40:57 +0300 Subject: Fix uninitialized variables. * mailbox/debug.c (mu_debug_print): Initialize ap. * mailbox/list.c (list_itrctl): Initialize ptr. * mailbox/mailer.c (send_fragments): Initialize status. --- mailbox/debug.c | 1 + mailbox/list.c | 1 + mailbox/mailer.c | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/mailbox/debug.c b/mailbox/debug.c index 37f9e4781..b595a7fe6 100644 --- a/mailbox/debug.c +++ b/mailbox/debug.c @@ -234,6 +234,7 @@ mu_debug_print (mu_debug_t debug, mu_log_level_t level, const char *format, ...) { va_list ap; + va_start (ap, format); mu_debug_printv (debug, level, format, ap); va_end (ap); return 0; diff --git a/mailbox/list.c b/mailbox/list.c index f47af2577..55802e2cc 100644 --- a/mailbox/list.c +++ b/mailbox/list.c @@ -599,6 +599,7 @@ list_itrctl (void *owner, enum mu_itrctl_req req, void *arg) /* Replace current element */ if (!arg) return EINVAL; + ptr = itr->cur; if (req == mu_itrctl_replace) DESTROY_ITEM (list, ptr); ptr = itr->cur; diff --git a/mailbox/mailer.c b/mailbox/mailer.c index f2786c89b..bd64683dc 100644 --- a/mailbox/mailer.c +++ b/mailbox/mailer.c @@ -487,7 +487,7 @@ send_fragments (mu_mailer_t mailer, struct timeval *delay, mu_address_t from, mu_address_t to) { - int status; + int status = 0; size_t i; char *msgid = NULL; -- cgit v1.2.1