commit: Avoid statement-before-declaration problems with strict C89 builds, fns.c

Aidan Kehoe kehoea at parhasard.net
Sat Sep 18 09:55:00 EDT 2010


changeset:   5275:5a9aa6c40c9b
tag:         tip
user:        Aidan Kehoe <kehoea at parhasard.net>
date:        Sat Sep 18 14:54:45 2010 +0100
files:       src/ChangeLog src/fns.c
description:
Avoid statement-before-declaration problems with strict C89 builds, fns.c

src/ChangeLog addition:

2010-09-18  Aidan Kehoe  <kehoea at 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!


diff -r ecdd1daab447 -r 5a9aa6c40c9b src/ChangeLog
--- 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 at 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 at parhasard.net>
 
 	* fns.c (Flist_length): New, moved here from cl-extra.el, needed
diff -r ecdd1daab447 -r 5a9aa6c40c9b src/fns.c
--- 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



More information about the XEmacs-Patches mailing list