[PATCH 4/5] cyrus-imapd-2.3.15-oldgcc.patch from Simon Matter
Bron Gondwana
brong at fastmail.fm
Thu Sep 10 09:53:36 EDT 2009
Make Cyrus compile with older GCC
---
imap/mbexamine.c | 6 +++---
imap/mupdate.c | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/imap/mbexamine.c b/imap/mbexamine.c
index d36897f..c248ba7 100644
--- a/imap/mbexamine.c
+++ b/imap/mbexamine.c
@@ -218,6 +218,7 @@ int do_examine(char *name,
struct mailbox mailbox;
struct index_record record;
cacherecord crec;
+ int j;
signals_poll();
@@ -321,7 +322,6 @@ int do_examine(char *name,
for(i=1; i<=mailbox.exists; i++) {
mailbox_read_index_record(&mailbox, i, &record);
- int j;
if(wantvalue) {
if(!wantuid) {
@@ -416,6 +416,8 @@ int do_quota(char *name,
struct mailbox mailbox;
struct index_record record;
uquota_t total = 0;
+ char fnamebuf[MAILBOX_FNAME_LEN];
+ struct stat sbuf;
signals_poll();
@@ -450,8 +452,6 @@ int do_quota(char *name,
for(i=1; i<=mailbox.exists; i++) {
mailbox_read_index_record(&mailbox, i, &record);
- char fnamebuf[MAILBOX_FNAME_LEN];
- struct stat sbuf;
strlcpy(fnamebuf, mailbox.path, sizeof(fnamebuf));
strlcat(fnamebuf, "/", sizeof(fnamebuf));
diff --git a/imap/mupdate.c b/imap/mupdate.c
index 4e22c9b..7dc7bbd 100644
--- a/imap/mupdate.c
+++ b/imap/mupdate.c
@@ -1163,6 +1163,7 @@ static void *thread_main(void *rock __attribute__((unused)))
int connflag;
int new_fd;
int ret = 0;
+ struct conn *ni;
/* Lock Worker Count Mutex */
pthread_mutex_lock(&worker_count_mutex); /* LOCK */
@@ -1299,7 +1300,6 @@ static void *thread_main(void *rock __attribute__((unused)))
/* Free all connections on idle_connlist. Note that
* any connection not currently on the idle_connlist will
* instead be freed when they drop out of their docmd() below */
- struct conn *ni;
pthread_mutex_lock(&idle_connlist_mutex); /* LOCK */
for(C=idle_connlist; C; C = ni) {
--
1.6.2.2.446.gfbdc0
More information about the Cyrus-devel
mailing list