From 2e64baa9d155c1a657ba43cbe0f9bd4846621b36 Mon Sep 17 00:00:00 2001 From: Nigel Metheringham Date: Mon, 21 Feb 2011 12:53:04 +0000 Subject: [PATCH] Moved variable decl to start of block for old gcc --- doc/doc-txt/ChangeLog | 4 ++++ src/src/spam.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog index 5646a147d..04b643f3e 100644 --- a/doc/doc-txt/ChangeLog +++ b/doc/doc-txt/ChangeLog @@ -72,6 +72,10 @@ PP/13 Bugzilla 1086: Deal with maildir quota file races. PP/14 Bugzilla 1019: DKIM multiple signature generation fix. Patch from Uwe Doering, sign-off by Michael Haardt. +NM/05 Fix to spam.c to accommodate older gcc versions which dislike + variable declaration deep within a block. Bug and patch from + Dennis Davis. + Exim version 4.74 ----------------- diff --git a/src/src/spam.c b/src/src/spam.c index 55999a397..3d38d99dd 100644 --- a/src/src/spam.c +++ b/src/src/spam.c @@ -150,6 +150,7 @@ int spam(uschar **listptr) { }; while ( num_servers > 0 ) { + int i; /* Randomly pick a server to try */ current_server = random_number( num_servers ); @@ -185,7 +186,6 @@ int spam(uschar **listptr) { /* Remove the server from the list. XXX We should free the memory */ num_servers--; - int i; for( i = current_server; i < num_servers; i++ ) spamd_address_vector[i] = spamd_address_vector[i+1]; } -- 2.25.1