OSDN Git Service

isl: fix warnings in release build
authorGrazvydas Ignotas <notasas@gmail.com>
Sat, 16 Apr 2016 01:00:14 +0000 (04:00 +0300)
committerIan Romanick <ian.d.romanick@intel.com>
Mon, 25 Apr 2016 10:23:28 +0000 (12:23 +0200)
Mark variables MAYBE_UNUSED to avoid unused-but-set-variable warnings
in release build.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Reviewed-by: Chad Versace <chad.versace@intel.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
src/intel/isl/isl.c
src/intel/isl/isl_gen7.c

index 0eaa808..6e492af 100644 (file)
@@ -695,7 +695,7 @@ isl_calc_phys_slice0_extent_sa_gen9_1d(
       const struct isl_extent4d *phys_level0_sa,
       struct isl_extent2d *phys_slice0_sa)
 {
-   const struct isl_format_layout *fmtl = isl_format_get_layout(info->format);
+   MAYBE_UNUSED const struct isl_format_layout *fmtl = isl_format_get_layout(info->format);
 
    assert(phys_level0_sa->height == 1);
    assert(phys_level0_sa->depth == 1);
index 7064e85..542c137 100644 (file)
@@ -313,7 +313,7 @@ gen7_choose_valign_el(const struct isl_device *dev,
                       const struct isl_surf_init_info *restrict info,
                       enum isl_tiling tiling)
 {
-   bool require_valign2 = false;
+   MAYBE_UNUSED bool require_valign2 = false;
    bool require_valign4 = false;
 
    if (isl_format_is_compressed(info->format))