Mercurial > hg > xemacs-beta
changeset 5538:580ef98f2beb
Suppress a "shadowed global" warning.
The warning is for j1 from <math.h> on Darwin.
author | Stephen J. Turnbull <stephen@xemacs.org> |
---|---|
date | Mon, 08 Aug 2011 13:57:18 +0900 |
parents | 2df2d9171f20 |
children | 4307b8e5998c |
files | src/ChangeLog src/mule-coding.c src/redisplay-xlike-inc.c |
diffstat | 3 files changed, 20 insertions(+), 13 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:18 2011 +0900 @@ -1,3 +1,10 @@ +2011-08-04 Stephen J. Turnbull <stephen@xemacs.org> + + * mule-coding.c (shift_jis_convert): + * redisplay-xlike-inc.c (XLIKE_output_vertical_divider): + Rename local variables to suppress GCC "shadowed global" warnings. + The warnings are due to non-ANSI functions from <math.h> on Darwin. + 2011-08-04 Stephen J. Turnbull <stephen@xemacs.org> * glyphs-eimage.c (png_instantiate): Rename a shadowing loop index
--- a/src/mule-coding.c Mon Aug 08 13:57:18 2011 +0900 +++ b/src/mule-coding.c Mon Aug 08 13:57:18 2011 +0900 @@ -214,10 +214,10 @@ ch = c; else { - UExtbyte j1, j2; - ENCODE_SHIFT_JIS (ch, c, j1, j2); - Dynarr_add (dst, j1); - Dynarr_add (dst, j2); + UExtbyte b1, b2; + ENCODE_SHIFT_JIS (ch, c, b1, b2); + Dynarr_add (dst, b1); + Dynarr_add (dst, b2); ch = 0; } }
--- a/src/redisplay-xlike-inc.c Mon Aug 08 13:57:18 2011 +0900 +++ b/src/redisplay-xlike-inc.c Mon Aug 08 13:57:18 2011 +0900 @@ -1782,7 +1782,7 @@ XLIKE_GC background_gc; enum edge_style style; unsigned long mask; - int x, y1, y2, width, shadow_thickness, spacing, line_width; + int x, ytop, ybottom, width, shadow_thickness, spacing, line_width; face_index div_face = get_builtin_face_cache_index (w, Vvertical_divider_face); @@ -1791,8 +1791,8 @@ spacing = XINT (w->vertical_divider_spacing); line_width = XINT (w->vertical_divider_line_width); x = WINDOW_RIGHT (w) - width; - y1 = WINDOW_TOP (w); - y2 = WINDOW_BOTTOM (w); + ytop = WINDOW_TOP (w); + ybottom = WINDOW_BOTTOM (w); memset (&gcv, ~0, sizeof (gcv)); @@ -1810,20 +1810,20 @@ window split occurs. */ #ifdef THIS_IS_X if (clear) - XClearArea (dpy, x_win, x, y1, width, y2 - y1, False); + XClearArea (dpy, x_win, x, ytop, width, ybottom - ytop, False); #else /* THIS_IS_GTK */ USED (dpy); /* if (clear) */ gdk_draw_rectangle (GDK_DRAWABLE (x_win), background_gc, TRUE, - x, y1, width, y2 - y1); + x, ytop, width, ybottom - ytop); #endif /* THIS_IS_GTK */ #ifndef THIS_IS_GTK /* #### FIXME Why not? Formerly '#if 0' in the GDK code */ /* Draw the divider line. */ XLIKE_FILL_RECTANGLE (dpy, x_win, background_gc, - x + spacing + shadow_thickness, y1, - line_width, y2 - y1); + x + spacing + shadow_thickness, ytop, + line_width, ybottom - ytop); #endif /* not THIS_IS_GTK */ if (shadow_thickness < 0) @@ -1837,8 +1837,8 @@ } /* Draw the shadows around the divider line */ - XLIKE_bevel_area (w, div_face, x + spacing, y1, - width - 2 * spacing, y2 - y1, + XLIKE_bevel_area (w, div_face, x + spacing, ytop, + width - 2 * spacing, ybottom - ytop, shadow_thickness, EDGE_ALL, style); }