Mesa (master): i965: add MAYBE_UNUSED to assert param

Timothy Arceri tarceri at kemper.freedesktop.org
Tue Oct 4 23:21:31 UTC 2016


Module: Mesa
Branch: master
Commit: df4ff31d3c1d907c237ed0e699deec1e24e8a9d3
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=df4ff31d3c1d907c237ed0e699deec1e24e8a9d3

Author: Timothy Arceri <timothy.arceri at collabora.com>
Date:   Tue Oct  4 11:15:04 2016 +1100

i965: add MAYBE_UNUSED to assert param

This fixes an unused variable warning on release builds.

Reviewed-by: Iago Toral Quiroga <itoral at igalia.com>

---

 src/mesa/drivers/dri/i965/brw_fs.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index dc000d9..58f5415 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -5866,7 +5866,7 @@ fs_visitor::allocate_registers(bool allow_spilling)
    schedule_instructions(SCHEDULE_POST);
 
    if (last_scratch > 0) {
-      unsigned max_scratch_size = 2 * 1024 * 1024;
+      MAYBE_UNUSED unsigned max_scratch_size = 2 * 1024 * 1024;
 
       prog_data->total_scratch = brw_get_scratch_size(last_scratch);
 




More information about the mesa-commit mailing list