[Mesa-dev] [PATCH 5/7] isl: fix warnings in release build
Grazvydas Ignotas
notasas at gmail.com
Sat Apr 16 01:00:14 UTC 2016
Mark variables MAYBE_UNUSED to avoid unused-but-set-variable warnings
in release build.
Signed-off-by: Grazvydas Ignotas <notasas at gmail.com>
---
I have no commit access, if this patch is ok, please someone push.
src/intel/isl/isl.c | 2 +-
src/intel/isl/isl_gen7.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/intel/isl/isl.c b/src/intel/isl/isl.c
index c596a8d..9c364f9 100644
--- a/src/intel/isl/isl.c
+++ b/src/intel/isl/isl.c
@@ -699,7 +699,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);
diff --git a/src/intel/isl/isl_gen7.c b/src/intel/isl/isl_gen7.c
index 7064e85..542c137 100644
--- a/src/intel/isl/isl_gen7.c
+++ b/src/intel/isl/isl_gen7.c
@@ -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))
--
2.7.4
More information about the mesa-dev
mailing list