Mercurial > dovecot > original-hg > dovecot-1.2
changeset 8027:62cf70991cf2 HEAD
extern/static fixes (from a sparse check by Diego Liziero)
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sun, 20 Jul 2008 21:00:33 +0300 |
parents | ff6ccf848cc1 |
children | ea4821b4e29a |
files | src/auth/db-ldap.c src/auth/db-sql.c src/dict/main.c src/imap/cmd-fetch.c src/imap/commands.c src/imap/imap-fetch.c src/imap/main.c src/lib-index/mail-index-transaction.c src/lib-index/mailbox-list-index.c src/lib-otp/otp-parity.h src/lib-sql/driver-sqlite.c src/lib-storage/index/mbox/mbox-lock.c src/login-common/client-common.c src/plugins/convert/convert-storage.c src/plugins/quota/quota-maildir.c src/pop3/main.c |
diffstat | 16 files changed, 24 insertions(+), 23 deletions(-) [+] |
line wrap: on
line diff
--- a/src/auth/db-ldap.c Sun Jul 20 20:29:37 2008 +0300 +++ b/src/auth/db-ldap.c Sun Jul 20 21:00:33 2008 +0300 @@ -109,7 +109,7 @@ { 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,
--- a/src/auth/db-sql.c Sun Jul 20 20:29:37 2008 +0300 +++ b/src/auth/db-sql.c Sun Jul 20 21:00:33 2008 +0300 @@ -26,7 +26,7 @@ { 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'",
--- a/src/dict/main.c Sun Jul 20 20:29:37 2008 +0300 +++ b/src/dict/main.c Sun Jul 20 21:00:33 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;
--- a/src/imap/cmd-fetch.c Sun Jul 20 20:29:37 2008 +0300 +++ b/src/imap/cmd-fetch.c Sun Jul 20 21:00:33 2008 +0300 @@ -9,13 +9,13 @@ #include <stdlib.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 };
--- a/src/imap/commands.c Sun Jul 20 20:29:37 2008 +0300 +++ b/src/imap/commands.c Sun Jul 20 21:00:33 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 @@ }; #define IMAP4REV1_COMMANDS_COUNT N_ELEMENTS(imap4rev1_commands) -const struct command imap_ext_commands[] = { +static const struct command imap_ext_commands[] = { { "CANCELUPDATE", cmd_cancelupdate,0 }, { "ENABLE", cmd_enable, 0 }, { "ID", cmd_id, 0 },
--- a/src/imap/imap-fetch.c Sun Jul 20 20:29:37 2008 +0300 +++ b/src/imap/imap-fetch.c Sun Jul 20 21:00:33 2008 +0300 @@ -23,7 +23,8 @@ "(NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL)" #define IMAP_FETCH_HANDLER_COUNT 9 -const struct imap_fetch_handler default_handlers[IMAP_FETCH_HANDLER_COUNT]; +extern const struct imap_fetch_handler + imap_fetch_default_handlers[IMAP_FETCH_HANDLER_COUNT]; static buffer_t *fetch_handlers = NULL; static int imap_fetch_handler_cmp(const void *p1, const void *p2) @@ -91,8 +92,8 @@ 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); @@ -800,7 +801,8 @@ return TRUE; } -const struct imap_fetch_handler default_handlers[IMAP_FETCH_HANDLER_COUNT] = { +const struct imap_fetch_handler +imap_fetch_default_handlers[IMAP_FETCH_HANDLER_COUNT] = { { "BODY", fetch_body_init }, { "BODYSTRUCTURE", fetch_bodystructure_init }, { "ENVELOPE", fetch_envelope_init },
--- a/src/imap/main.c Sun Jul 20 20:29:37 2008 +0300 +++ b/src/imap/main.c Sun Jul 20 21:00:33 2008 +0300 @@ -30,7 +30,7 @@ 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 },
--- a/src/lib-index/mail-index-transaction.c Sun Jul 20 20:29:37 2008 +0300 +++ b/src/lib-index/mail-index-transaction.c Sun Jul 20 21:00:33 2008 +0300 @@ -1613,7 +1613,7 @@ t->log_updates = mail_index_transaction_has_changes(t); } -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 };
--- a/src/lib-index/mailbox-list-index.c Sun Jul 20 20:29:37 2008 +0300 +++ b/src/lib-index/mailbox-list-index.c Sun Jul 20 21:00:33 2008 +0300 @@ -41,7 +41,7 @@ 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,
--- a/src/lib-otp/otp-parity.h Sun Jul 20 20:29:37 2008 +0300 +++ b/src/lib-otp/otp-parity.h Sun Jul 20 21:00:33 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) {
--- a/src/lib-sql/driver-sqlite.c Sun Jul 20 20:29:37 2008 +0300 +++ b/src/lib-sql/driver-sqlite.c Sun Jul 20 21:00:33 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;
--- a/src/lib-storage/index/mbox/mbox-lock.c Sun Jul 20 20:29:37 2008 +0300 +++ b/src/lib-storage/index/mbox/mbox-lock.c Sun Jul 20 21:00:33 2008 +0300 @@ -82,7 +82,7 @@ # 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 },
--- a/src/login-common/client-common.c Sun Jul 20 20:29:37 2008 +0300 +++ b/src/login-common/client-common.c Sun Jul 20 21:00:33 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) {
--- a/src/plugins/convert/convert-storage.c Sun Jul 20 20:29:37 2008 +0300 +++ b/src/plugins/convert/convert-storage.c Sun Jul 20 21:00:33 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,
--- a/src/plugins/quota/quota-maildir.c Sun Jul 20 20:29:37 2008 +0300 +++ b/src/plugins/quota/quota-maildir.c Sun Jul 20 21:00:33 2008 +0300 @@ -46,7 +46,7 @@ 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,
--- a/src/pop3/main.c Sun Jul 20 20:29:37 2008 +0300 +++ b/src/pop3/main.c Sun Jul 20 21:00:33 2008 +0300 @@ -30,7 +30,7 @@ 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 }