From 141220bae2bc0d9ba9f6ed185d10bfe31cd5145e Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Thu, 8 Dec 2022 10:35:52 -0800 Subject: Rename several function arguments to avoid -Wshadow warnings Signed-off-by: Alan Coopersmith --- b4light.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/b4light.c b/b4light.c index 6298db3..24d4924 100644 --- a/b4light.c +++ b/b4light.c @@ -126,38 +126,38 @@ StepPen (void) } static void -DrawPoints (Drawable draw, GC gc, XPoint *p, int n) +DrawPoints (Drawable draw, GC draw_gc, XPoint *pt, int n) { XPoint xp[MAX_POINTS + 1]; int i; switch (n) { case 1: - XDrawPoint (display, draw, gc, p->x, p->y); + XDrawPoint (display, draw, draw_gc, pt->x, pt->y); break; case 2: - XDrawLine (display, draw, gc, p[0].x, p[0].y, p[1].x, p[1].y); + XDrawLine (display, draw, draw_gc, pt[0].x, pt[0].y, pt[1].x, pt[1].y); break; default: for (i = 0; i < n; i++) { - xp[i].x = p[i].x; xp[i].y = p[i].y; + xp[i].x = pt[i].x; xp[i].y = pt[i].y; } - xp[i].x = p[0].x; xp[i].y = p[0].y; + xp[i].x = pt[0].x; xp[i].y = pt[0].y; if (filled) - XFillPolygon (display, draw, gc, xp, i+1, Complex, CoordModeOrigin); + XFillPolygon (display, draw, draw_gc, xp, i+1, Complex, CoordModeOrigin); else - XDrawLines (display, draw, gc, xp, i + 1, CoordModeOrigin); + XDrawLines (display, draw, draw_gc, xp, i + 1, CoordModeOrigin); } } static void -Draw (Moving *p, int n) +Draw (Moving *mp, int n) { XPoint xp[MAX_POINTS]; int i; for (i = 0; i < n; i++) { - xp[i].x = p[i].x; xp[i].y = p[i].y; + xp[i].x = mp[i].x; xp[i].y = mp[i].y; } old_pixels[history_head] = pixels[cur_pen]; StepPen (); @@ -173,7 +173,7 @@ Draw (Moving *p, int n) } static void -Erase (XPoint *p, int n) +Erase (XPoint *pt, int n) { if (filled) { XSetForeground (display, erase_gc, black_pixel ^ old_pixels[history_tail]); @@ -181,7 +181,7 @@ Erase (XPoint *p, int n) 0, 0, scr_wid, scr_hei, 0, 0, 1); } else - DrawPoints (saver, black_gc, p, n); + DrawPoints (saver, black_gc, pt, n); } #define STEP_MAX 32 @@ -276,7 +276,7 @@ StopSaver (void) } static int -ignoreError (Display *display, XErrorEvent *error) +ignoreError (Display *dpy, XErrorEvent *error) { return 0; } -- cgit v1.2.3