changeset 5539:4307b8e5998c

Suppress "shadowed global" warnings for floor and ceil from <math.h>.
author Stephen J. Turnbull <stephen@xemacs.org>
date Mon, 08 Aug 2011 13:57:19 +0900
parents 580ef98f2beb
children eed303fac325
files src/ChangeLog src/search.c
diffstat 2 files changed, 15 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Mon Aug 08 13:57:18 2011 +0900
+++ b/src/ChangeLog	Mon Aug 08 13:57:19 2011 +0900
@@ -1,3 +1,9 @@
+2011-08-04  Stephen J. Turnbull  <stephen@xemacs.org>
+
+	* search.c (byte_scan_buffer):
+	Rename local variables to suppress GCC "shadowed global" warnings.
+	The warnings are due to ANSI functions from <math.h> on Darwin.
+
 2011-08-04  Stephen J. Turnbull  <stephen@xemacs.org>
 
 	* mule-coding.c (shift_jis_convert):
--- a/src/search.c	Mon Aug 08 13:57:18 2011 +0900
+++ b/src/search.c	Mon Aug 08 13:57:19 2011 +0900
@@ -689,20 +689,20 @@
 	  Raw_Ichar raw = ichar_to_raw (target, fmt, wrap_buffer (buf));
 	  while (st < lim && count > 0)
 	    {
-	      Bytebpos ceil;
+	      Bytebpos ceiling;
 	      Ibyte *bufptr;
 
-	      ceil = BYTE_BUF_CEILING_OF (buf, st);
-	      ceil = min (lim, ceil);
+	      ceiling = BYTE_BUF_CEILING_OF (buf, st);
+	      ceiling = min (lim, ceiling);
 	      bufptr = (Ibyte *) memchr (BYTE_BUF_BYTE_ADDRESS (buf, st),
-					   raw, ceil - st);
+					   raw, ceiling - st);
 	      if (bufptr)
 		{
 		  count--;
 		  st = BYTE_BUF_PTR_BYTE_POS (buf, bufptr) + 1;
 		}
 	      else
-		st = ceil;
+		st = ceiling;
 	    }
 	}
 
@@ -740,15 +740,15 @@
 	  Raw_Ichar raw = ichar_to_raw (target, fmt, wrap_buffer (buf));
 	  while (st > lim && count < 0)
 	    {
-	      Bytebpos floor;
+	      Bytebpos floorpos;
 	      Ibyte *bufptr;
 	      Ibyte *floorptr;
 
-	      floor = BYTE_BUF_FLOOR_OF (buf, st);
-	      floor = max (lim, floor);
+	      floorpos = BYTE_BUF_FLOOR_OF (buf, st);
+	      floorpos = max (lim, floorpos);
 	      /* No memrchr() ... */
 	      bufptr = BYTE_BUF_BYTE_ADDRESS_BEFORE (buf, st);
-	      floorptr = BYTE_BUF_BYTE_ADDRESS (buf, floor);
+	      floorptr = BYTE_BUF_BYTE_ADDRESS (buf, floorpos);
 	      while (bufptr >= floorptr)
 		{
 		  st--;