dovecot-1.1: extern/static fixes (from a sparse check by Diego L...
dovecot at dovecot.org
dovecot at dovecot.org
Sun Jul 20 21:00:41 EEST 2008
details: http://hg.dovecot.org/dovecot-1.1/rev/6e37f9e1a97d
changeset: 7773:6e37f9e1a97d
user: Timo Sirainen <tss at iki.fi>
date: Sun Jul 20 20:58:48 2008 +0300
description:
extern/static fixes (from a sparse check by Diego Liziero)
diffstat:
16 files changed, 22 insertions(+), 23 deletions(-)
src/auth/db-ldap.c | 2 +-
src/auth/db-sql.c | 2 +-
src/dict/main.c | 3 +--
src/imap/cmd-fetch.c | 6 +++---
src/imap/commands.c | 4 ++--
src/imap/imap-fetch.c | 8 ++++----
src/imap/main.c | 2 +-
src/lib-index/mail-index-transaction.c | 2 +-
src/lib-index/mailbox-list-index.c | 2 +-
src/lib-otp/otp-parity.h | 2 +-
src/lib-sql/driver-sqlite.c | 2 +-
src/lib-storage/index/mbox/mbox-lock.c | 2 +-
src/login-common/client-common.c | 2 +-
src/plugins/convert/convert-storage.c | 2 +-
src/plugins/quota/quota-maildir.c | 2 +-
src/pop3/main.c | 2 +-
diffs (230 lines):
diff -r adb5be74149d -r 6e37f9e1a97d src/auth/db-ldap.c
--- a/src/auth/db-ldap.c Sun Jul 20 20:50:45 2008 +0300
+++ b/src/auth/db-ldap.c Sun Jul 20 20:58:48 2008 +0300
@@ -109,7 +109,7 @@ static struct setting_def setting_defs[]
{ 0, NULL, 0 }
};
-struct ldap_settings default_ldap_settings = {
+static struct ldap_settings default_ldap_settings = {
MEMBER(hosts) NULL,
MEMBER(uris) NULL,
MEMBER(dn) NULL,
diff -r adb5be74149d -r 6e37f9e1a97d src/auth/db-sql.c
--- a/src/auth/db-sql.c Sun Jul 20 20:50:45 2008 +0300
+++ b/src/auth/db-sql.c Sun Jul 20 20:58:48 2008 +0300
@@ -26,7 +26,7 @@ static struct setting_def setting_defs[]
{ 0, NULL, 0 }
};
-struct sql_settings default_sql_settings = {
+static struct sql_settings default_sql_settings = {
MEMBER(driver) NULL,
MEMBER(connect) NULL,
MEMBER(password_query) "SELECT username, domain, password FROM users WHERE username = '%n' AND domain = '%d'",
diff -r adb5be74149d -r 6e37f9e1a97d src/dict/main.c
--- a/src/dict/main.c Sun Jul 20 20:50:45 2008 +0300
+++ b/src/dict/main.c Sun Jul 20 20:58:48 2008 +0300
@@ -18,8 +18,7 @@
#define DICT_MASTER_LISTENER_FD 3
-struct ioloop *ioloop;
-
+static struct ioloop *ioloop;
static struct io *log_io;
static struct module *modules;
static struct dict_server *dict_server;
diff -r adb5be74149d -r 6e37f9e1a97d src/imap/cmd-fetch.c
--- a/src/imap/cmd-fetch.c Sun Jul 20 20:50:45 2008 +0300
+++ b/src/imap/cmd-fetch.c Sun Jul 20 20:58:48 2008 +0300
@@ -7,13 +7,13 @@
#include "imap-search.h"
#include "mail-search.h"
-const char *all_macro[] = {
+static const char *all_macro[] = {
"FLAGS", "INTERNALDATE", "RFC822.SIZE", "ENVELOPE", NULL
};
-const char *fast_macro[] = {
+static const char *fast_macro[] = {
"FLAGS", "INTERNALDATE", "RFC822.SIZE", NULL
};
-const char *full_macro[] = {
+static const char *full_macro[] = {
"FLAGS", "INTERNALDATE", "RFC822.SIZE", "ENVELOPE", "BODY", NULL
};
diff -r adb5be74149d -r 6e37f9e1a97d src/imap/commands.c
--- a/src/imap/commands.c Sun Jul 20 20:50:45 2008 +0300
+++ b/src/imap/commands.c Sun Jul 20 20:58:48 2008 +0300
@@ -7,7 +7,7 @@
#include <stdlib.h>
-const struct command imap4rev1_commands[] = {
+static const struct command imap4rev1_commands[] = {
{ "CAPABILITY", cmd_capability, 0 },
{ "LOGOUT", cmd_logout, COMMAND_FLAG_BREAKS_MAILBOX },
{ "NOOP", cmd_noop, COMMAND_FLAG_BREAKS_SEQS },
@@ -40,7 +40,7 @@ const struct command imap4rev1_commands[
};
#define IMAP4REV1_COMMANDS_COUNT N_ELEMENTS(imap4rev1_commands)
-const struct command imap_ext_commands[] = {
+static const struct command imap_ext_commands[] = {
{ "IDLE", cmd_idle, COMMAND_FLAG_BREAKS_SEQS },
{ "NAMESPACE", cmd_namespace, 0 },
{ "SORT", cmd_sort, COMMAND_FLAG_USES_SEQS },
diff -r adb5be74149d -r 6e37f9e1a97d src/imap/imap-fetch.c
--- a/src/imap/imap-fetch.c Sun Jul 20 20:50:45 2008 +0300
+++ b/src/imap/imap-fetch.c Sun Jul 20 20:58:48 2008 +0300
@@ -20,7 +20,7 @@
#define ENVELOPE_NIL_REPLY \
"(NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL)"
-const struct imap_fetch_handler default_handlers[7];
+extern const struct imap_fetch_handler imap_fetch_default_handlers[7];
static buffer_t *fetch_handlers = NULL;
static int imap_fetch_handler_cmp(const void *p1, const void *p2)
@@ -87,8 +87,8 @@ struct imap_fetch_context *imap_fetch_in
struct imap_fetch_context *ctx;
if (fetch_handlers == NULL) {
- imap_fetch_handlers_register(default_handlers,
- N_ELEMENTS(default_handlers));
+ imap_fetch_handlers_register(imap_fetch_default_handlers,
+ N_ELEMENTS(imap_fetch_default_handlers));
}
ctx = p_new(cmd->pool, struct imap_fetch_context, 1);
@@ -583,7 +583,7 @@ fetch_uid_init(struct imap_fetch_context
return TRUE;
}
-const struct imap_fetch_handler default_handlers[7] = {
+const struct imap_fetch_handler imap_fetch_default_handlers[7] = {
{ "BODY", fetch_body_init },
{ "BODYSTRUCTURE", fetch_bodystructure_init },
{ "ENVELOPE", fetch_envelope_init },
diff -r adb5be74149d -r 6e37f9e1a97d src/imap/main.c
--- a/src/imap/main.c Sun Jul 20 20:50:45 2008 +0300
+++ b/src/imap/main.c Sun Jul 20 20:58:48 2008 +0300
@@ -30,7 +30,7 @@ struct client_workaround_list {
enum client_workarounds num;
};
-struct client_workaround_list client_workaround_list[] = {
+static struct client_workaround_list client_workaround_list[] = {
{ "delay-newmail", WORKAROUND_DELAY_NEWMAIL },
{ "outlook-idle", 0 }, /* only for backwards compatibility */
{ "netscape-eoh", WORKAROUND_NETSCAPE_EOH },
diff -r adb5be74149d -r 6e37f9e1a97d src/lib-index/mail-index-transaction.c
--- a/src/lib-index/mail-index-transaction.c Sun Jul 20 20:50:45 2008 +0300
+++ b/src/lib-index/mail-index-transaction.c Sun Jul 20 20:58:48 2008 +0300
@@ -1424,7 +1424,7 @@ void mail_index_reset(struct mail_index_
t->reset = TRUE;
}
-struct mail_index_transaction_vfuncs trans_vfuncs = {
+static struct mail_index_transaction_vfuncs trans_vfuncs = {
mail_index_transaction_commit_v,
mail_index_transaction_rollback_v
};
diff -r adb5be74149d -r 6e37f9e1a97d src/lib-index/mailbox-list-index.c
--- a/src/lib-index/mailbox-list-index.c Sun Jul 20 20:50:45 2008 +0300
+++ b/src/lib-index/mailbox-list-index.c Sun Jul 20 20:58:48 2008 +0300
@@ -41,7 +41,7 @@ struct mailbox_list_iter_ctx {
unsigned int failed:1;
};
-const struct dotlock_settings default_dotlock_set = {
+static const struct dotlock_settings default_dotlock_set = {
MEMBER(temp_prefix) NULL,
MEMBER(lock_suffix) NULL,
diff -r adb5be74149d -r 6e37f9e1a97d src/lib-otp/otp-parity.h
--- a/src/lib-otp/otp-parity.h Sun Jul 20 20:50:45 2008 +0300
+++ b/src/lib-otp/otp-parity.h Sun Jul 20 20:58:48 2008 +0300
@@ -1,7 +1,7 @@
#ifndef OTP_PARITY_H
#define OTP_PARITY_H
-const unsigned char parity_table[256];
+extern const unsigned char parity_table[256];
static inline unsigned int otp_parity(unsigned char *data)
{
diff -r adb5be74149d -r 6e37f9e1a97d src/lib-sql/driver-sqlite.c
--- a/src/lib-sql/driver-sqlite.c Sun Jul 20 20:50:45 2008 +0300
+++ b/src/lib-sql/driver-sqlite.c Sun Jul 20 20:58:48 2008 +0300
@@ -9,7 +9,7 @@
#include <sqlite3.h>
/* retry time if db is busy (in ms) */
-const int sqlite_busy_timeout = 1000;
+static const int sqlite_busy_timeout = 1000;
struct sqlite_db {
struct sql_db api;
diff -r adb5be74149d -r 6e37f9e1a97d src/lib-storage/index/mbox/mbox-lock.c
--- a/src/lib-storage/index/mbox/mbox-lock.c Sun Jul 20 20:50:45 2008 +0300
+++ b/src/lib-storage/index/mbox/mbox-lock.c Sun Jul 20 20:58:48 2008 +0300
@@ -82,7 +82,7 @@ static int mbox_lock_lockf(struct mbox_l
# define mbox_lock_lockf NULL
#endif
-struct mbox_lock_data lock_data[] = {
+static struct mbox_lock_data lock_data[] = {
{ MBOX_LOCK_DOTLOCK, "dotlock", mbox_lock_dotlock },
{ MBOX_LOCK_DOTLOCK_TRY, "dotlock_try", mbox_lock_dotlock_try },
{ MBOX_LOCK_FCNTL, "fcntl", mbox_lock_fcntl },
diff -r adb5be74149d -r 6e37f9e1a97d src/login-common/client-common.c
--- a/src/login-common/client-common.c Sun Jul 20 20:50:45 2008 +0300
+++ b/src/login-common/client-common.c Sun Jul 20 20:58:48 2008 +0300
@@ -12,7 +12,7 @@
#include <stdlib.h>
struct client *clients = NULL;
-unsigned int clients_count = 0;
+static unsigned int clients_count = 0;
void client_link(struct client *client)
{
diff -r adb5be74149d -r 6e37f9e1a97d src/plugins/convert/convert-storage.c
--- a/src/plugins/convert/convert-storage.c Sun Jul 20 20:50:45 2008 +0300
+++ b/src/plugins/convert/convert-storage.c Sun Jul 20 20:58:48 2008 +0300
@@ -14,7 +14,7 @@
#define CONVERT_LOCK_FILENAME ".dovecot.convert"
-struct dotlock_settings dotlock_settings = {
+static struct dotlock_settings dotlock_settings = {
MEMBER(temp_prefix) NULL,
MEMBER(lock_suffix) NULL,
diff -r adb5be74149d -r 6e37f9e1a97d src/plugins/quota/quota-maildir.c
--- a/src/plugins/quota/quota-maildir.c Sun Jul 20 20:50:45 2008 +0300
+++ b/src/plugins/quota/quota-maildir.c Sun Jul 20 20:58:48 2008 +0300
@@ -46,7 +46,7 @@ struct maildir_list_context {
extern struct quota_backend quota_backend_maildir;
-struct dotlock_settings dotlock_settings = {
+static struct dotlock_settings dotlock_settings = {
MEMBER(temp_prefix) NULL,
MEMBER(lock_suffix) NULL,
diff -r adb5be74149d -r 6e37f9e1a97d src/pop3/main.c
--- a/src/pop3/main.c Sun Jul 20 20:50:45 2008 +0300
+++ b/src/pop3/main.c Sun Jul 20 20:58:48 2008 +0300
@@ -28,7 +28,7 @@ struct client_workaround_list {
enum client_workarounds num;
};
-struct client_workaround_list client_workaround_list[] = {
+static struct client_workaround_list client_workaround_list[] = {
{ "outlook-no-nuls", WORKAROUND_OUTLOOK_NO_NULS },
{ "oe-ns-eoh", WORKAROUND_OE_NS_EOH },
{ NULL, 0 }
More information about the dovecot-cvs
mailing list