diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2022-12-08 10:35:52 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2022-12-08 10:35:52 -0800 |
commit | 141220bae2bc0d9ba9f6ed185d10bfe31cd5145e (patch) | |
tree | a7d4c06554b2b9679735f966a56fa22c498cf5d3 | |
parent | 268eec6cd7c4f3c9e9efbbadef470dba84ec59b2 (diff) |
Rename several function arguments to avoid -Wshadow warnings
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r-- | b4light.c | 24 |
1 files changed, 12 insertions, 12 deletions
@@ -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; } |