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 0eaa8087c71ba620da5e4e8c3628df55ee4299c7..6e492afe983eb3a4785c964558f712805a3a50c3 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 7064e852e654d71b0889da24f3692e2043007fa6..542c137458fc82b0569757f104d3e5f7068d765d 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))