From afc7f259668bbb25d5b06929d529add93fb39ebf Mon Sep 17 00:00:00 2001 From: "Thomas E. Dickey" Date: Thu, 8 Sep 2022 19:20:53 -0400 Subject: cppcheck (removing unused assignment lets variable scope reduction) Signed-off-by: Thomas E. Dickey --- src/Xrender.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Xrender.c b/src/Xrender.c index 7f302f1..5924a5f 100644 --- a/src/Xrender.c +++ b/src/Xrender.c @@ -868,7 +868,7 @@ XRenderQueryPictIndexValues(Display *dpy, xRenderQueryPictIndexValuesReq *req; xRenderQueryPictIndexValuesReply rep; XIndexValue *values; - unsigned int nbytes, nread, rlength, i; + unsigned int nbytes, nread, i; RenderCheckExtension (dpy, info, NULL); @@ -886,6 +886,7 @@ XRenderQueryPictIndexValues(Display *dpy, if ((rep.length < (INT_MAX >> 2)) && (rep.numIndexValues < (INT_MAX / sizeof (XIndexValue)))) { + unsigned int rlength; /* request data length */ nbytes = rep.length << 2; /* bytes of actual data in the request */ @@ -896,7 +897,7 @@ XRenderQueryPictIndexValues(Display *dpy, /* allocate returned data */ values = Xmalloc (rlength); } else { - nbytes = nread = rlength = 0; + nbytes = nread = 0; values = NULL; } -- cgit v1.2.3