changeset 5275:5a9aa6c40c9b

Avoid statement-before-declaration problems with strict C89 builds, fns.c src/ChangeLog addition: 2010-09-18 Aidan Kehoe <kehoea@parhasard.net> * fns.c (Freduce): Move statements outside of the braces surrounding the EXTERNAL_LIST_LOOP_3 macro, fixing strict C89 builds. Thank you for the report, Vin!
author Aidan Kehoe <kehoea@parhasard.net>
date Sat, 18 Sep 2010 14:54:45 +0100
parents ecdd1daab447
children dd2976af8783
files src/ChangeLog src/fns.c
diffstat 2 files changed, 9 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Thu Sep 16 21:00:17 2010 +0100
+++ b/src/ChangeLog	Sat Sep 18 14:54:45 2010 +0100
@@ -1,3 +1,10 @@
+2010-09-18  Aidan Kehoe  <kehoea@parhasard.net>
+
+	* fns.c (Freduce):
+	Move statements outside of the braces surrounding the
+	EXTERNAL_LIST_LOOP_3 macro, fixing strict C89 builds. Thank you
+	for the report, Vin!
+
 2010-09-16  Aidan Kehoe  <kehoea@parhasard.net>
 
 	* fns.c (Flist_length): New, moved here from cl-extra.el, needed
--- a/src/fns.c	Thu Sep 16 21:00:17 2010 +0100
+++ b/src/fns.c	Sat Sep 18 14:54:45 2010 +0100
@@ -5248,7 +5248,6 @@
             }
           else if (ending - starting)
             {
-              ii = 0;
               EXTERNAL_LIST_LOOP_3 (elt, sequence, tail)
                 {
 		  /* KEY may amputate the list behind us; make sure what
@@ -5264,10 +5263,10 @@
                 }
             }
 
+	  ii = 0;
+
           if (ending - starting)
             {
-              ii = 0;
-
               EXTERNAL_LIST_LOOP_3 (elt, sequence, tail)
                 {
 		  /* KEY or FUNCTION may amputate the list behind us; make