[PATCH 06/14] fb: Simplify logic, get rid of set but unused variable.
Alan Coopersmith
alan.coopersmith at oracle.com
Tue May 24 14:00:53 PDT 2011
On 05/24/11 09:41 AM, Cyril Brulebois wrote:
> wrapped is only useful is FB_ACCESS_WRAPPER is set; simplify the logic
> accordingly, and only set it when that's defined.
>
> The following warning goes away accordingly:
> | CC libfb_la-fbarc.lo
> | fbarc.c: In function 'fbPolyArc':
> | fbarc.c:71:11: warning: variable 'wrapped' set but not used [-Wunused-but-set-variable]
>
> Signed-off-by: Cyril Brulebois <kibi at debian.org>
> ---
> fb/fbarc.c | 9 +++------
> 1 files changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/fb/fbarc.c b/fb/fbarc.c
> index a0c5343..e54c804 100644
> --- a/fb/fbarc.c
> +++ b/fb/fbarc.c
> @@ -68,15 +68,12 @@ fbPolyArc (DrawablePtr pDrawable,
> BoxRec box;
> int x2, y2;
> RegionPtr cclip;
> - int wrapped = 0;
> +#ifdef FB_ACCESS_WRAPPER
> + int wrapped = 1;
> +#endif
>
> cclip = fbGetCompositeClip (pGC);
> fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff);
> -#ifdef FB_ACCESS_WRAPPER
> - wrapped = 1;
> -#else
> - wrapped = 0;
> -#endif
> while (narcs--)
> {
> if (miCanZeroArc (parcs))
Reviewed-by: Alan Coopersmith <alan.coopersmith at oracle.com>
--
-Alan Coopersmith- alan.coopersmith at oracle.com
Oracle Solaris Platform Engineering: X Window System
More information about the xorg-devel
mailing list