[Mesa-dev] [PATCH 3/5] i915: silence unused var warnings in non-debug builds

Chad Versace chad at chad-versace.us
Fri Oct 7 09:24:31 PDT 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 10/07/2011 07:30 AM, Brian Paul wrote:
> From: Brian Paul <brianp at vmware.com>
> 
> ---
>  src/mesa/drivers/dri/i915/i830_vtbl.c |    2 ++
>  src/mesa/drivers/dri/i915/i915_vtbl.c |    2 ++
>  2 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/src/mesa/drivers/dri/i915/i830_vtbl.c b/src/mesa/drivers/dri/i915/i830_vtbl.c
> index 7810f56..d8f9634 100644
> --- a/src/mesa/drivers/dri/i915/i830_vtbl.c
> +++ b/src/mesa/drivers/dri/i915/i830_vtbl.c
> @@ -717,6 +717,8 @@ i830_update_draw_buffer(struct intel_context *intel)
>     struct intel_renderbuffer *irbDepth = NULL, *irbStencil = NULL;
>     bool fb_has_hiz = intel_framebuffer_has_hiz(fb);
>  
> +   (void) fb_has_hiz;
> +
>     if (!fb) {
>        /* this can happen during the initial context initialization */
>        return;
> diff --git a/src/mesa/drivers/dri/i915/i915_vtbl.c b/src/mesa/drivers/dri/i915/i915_vtbl.c
> index 1e84c6d..f4d8dff 100644
> --- a/src/mesa/drivers/dri/i915/i915_vtbl.c
> +++ b/src/mesa/drivers/dri/i915/i915_vtbl.c
> @@ -717,6 +717,8 @@ i915_update_draw_buffer(struct intel_context *intel)
>     struct intel_renderbuffer *irbDepth = NULL, *irbStencil = NULL;
>     bool fb_has_hiz = intel_framebuffer_has_hiz(fb);
>  
> +   (void) fb_has_hiz;
> +
>     if (!fb) {
>        /* this can happen during the initial context initialization */
>        return;

Since fb_has_hiz is never used in these functions, the variable shouldn't be
declared and the call to intel_framebuffer_has_hiz just wastes CPU time.

- -- 
Chad Versace
chad at chad-versace.us
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJOjye8AAoJEAIvNt057x8iUV0P/2f5gblrqnroWHABWjWtpDJI
SDx6SwKdX5kI5w4TfG13cq1FQntZLoPzT2BBnoLhvFiTceLTGrnwgyDbngoTaDWh
x9mPSkA3yLYVB4LaSSs/BnNPm/HLh6gXkU6Q8FwfTOvvlzSsOTsMhvUuhj6MY3Au
4iewlY6DmWzsg0B1e5p89vJSBWdjOcGrsb7DYrgT1UH4YHp5NA06XmFt6nhK4HPX
TjjKyNTs+VqLUTK91EPiL9vGCceK548LXfZyF9J9yBw4AqQKChLRMc7o3o5EXv0m
sUcbJyWd+PHdRKFRMzvktggtTsUXdRBGSwZK/wVwrKD3mvH3+vVZ7oGP9HJxdYVE
zPYeYWBPCrnSX3goULtiZWRpsKWkLPJUCkxV6m68U9Ur0bfxXZLlVE1sexSDNxOK
C0Sw/M7FSOkvcoiTGVbrTRM22tACZtR2/VLB1HFOBY13w9rzApm3JTALomKuTtWR
TUJ2l8brpklsGofuapCSu7ZRS8S/KbiFK4nvGrUdKshVdfMmaw7ejeLJk/X0Sle1
6LQdUTOwwKf1EGWusAhzTpQ7TrqfAaWgQjd38tdCFEWCie5Ifzdh4vp8O4hmOO18
iLT67Q9fB2qFleEvgVyhJoZSurrwXiA3j0zWRdmmChfFGUk3keS4iREHO3nV0DZV
1mNZ8pC9PCqoeXN7BlP3
=svVy
-----END PGP SIGNATURE-----


More information about the mesa-dev mailing list