i965: avoid 'unused variable' warnings
authorAndrii Simiklit <andrii.simiklit@globallogic.com>
Tue, 13 Nov 2018 12:19:30 +0000 (14:19 +0200)
committerEric Engestrom <eric.engestrom@intel.com>
Wed, 14 Nov 2018 14:41:58 +0000 (14:41 +0000)
1. brw_pipe_control.c:311:34: warning:
    unused variable ‘devinfo’
2. brw_program_binary.c:209:19: warning:
    unused variable ‘gen_size’
3. brw_program_binary.c:216:19: warning:
    unused variable ‘nir_size’

v2: Changes for unreproducible issues were removed

Signed-off-by: Andrii Simiklit <andrii.simiklit@globallogic.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
src/mesa/drivers/dri/i965/brw_pipe_control.c
src/mesa/drivers/dri/i965/brw_program_binary.c

index 122ac260703e56ae52fc12fffb1b7e0aeeffb4d2..a3f521b5aecdfd9e5169f86c4635c70e8de4c0e6 100644 (file)
@@ -308,7 +308,7 @@ brw_emit_depth_stall_flushes(struct brw_context *brw)
 void
 gen7_emit_vs_workaround_flush(struct brw_context *brw)
 {
-   const struct gen_device_info *devinfo = &brw->screen->devinfo;
+   MAYBE_UNUSED const struct gen_device_info *devinfo = &brw->screen->devinfo;
 
    assert(devinfo->gen == 7);
    brw_emit_pipe_control_write(brw,
index db03332241e4506ee9310b45815a8c782a0951ef..1298d9e765ec27e7d9c48b16bf00f118ebec723a 100644 (file)
@@ -206,14 +206,14 @@ brw_program_deserialize_driver_blob(struct gl_context *ctx,
          break;
       switch ((enum driver_cache_blob_part)part_type) {
       case GEN_PART: {
-         uint32_t gen_size = blob_read_uint32(&reader);
+         MAYBE_UNUSED uint32_t gen_size = blob_read_uint32(&reader);
          assert(!reader.overrun &&
                 (uintptr_t)(reader.end - reader.current) > gen_size);
          deserialize_gen_program(&reader, ctx, prog, stage);
          break;
       }
       case NIR_PART: {
-         uint32_t nir_size = blob_read_uint32(&reader);
+         MAYBE_UNUSED uint32_t nir_size = blob_read_uint32(&reader);
          assert(!reader.overrun &&
                 (uintptr_t)(reader.end - reader.current) > nir_size);
          const struct nir_shader_compiler_options *options =