anv: fix warnings in release build
authorGrazvydas Ignotas <notasas@gmail.com>
Sat, 16 Apr 2016 01:00:15 +0000 (04:00 +0300)
committerIan Romanick <ian.d.romanick@intel.com>
Mon, 25 Apr 2016 10:23:31 +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/vulkan/anv_dump.c
src/intel/vulkan/anv_image.c
src/intel/vulkan/gen7_cmd_buffer.c
src/intel/vulkan/gen8_cmd_buffer.c

index b7fa28be78779b48e1424f898d592d82f96cf6c0..63ad2cd070a3a6a9a9b1a774095e17b7e82bff53 100644 (file)
@@ -33,7 +33,7 @@ anv_dump_image_to_ppm(struct anv_device *device,
                       unsigned array_layer, const char *filename)
 {
    VkDevice vk_device = anv_device_to_handle(device);
-   VkResult result;
+   MAYBE_UNUSED VkResult result;
 
    VkExtent2D extent = { image->extent.width, image->extent.height };
    for (unsigned i = 0; i < miplevel; i++) {
index 03a8cb88d90ff7766458d703adc5c08386d95382..fb2838924dd5a43d8f083754367044d9d46d6bb4 100644 (file)
@@ -343,7 +343,7 @@ anv_validate_CreateImageView(VkDevice _device,
 {
    ANV_FROM_HANDLE(anv_image, image, pCreateInfo->image);
    const VkImageSubresourceRange *subresource;
-   const struct anv_format *view_format_info;
+   MAYBE_UNUSED const struct anv_format *view_format_info;
 
    /* Validate structure type before dereferencing it. */
    assert(pCreateInfo);
index 9bc949ddeef5ff457f1a3d076460d51a1b8fea26..03ce889088acb40f9320352bd51d19f7979c8b79 100644 (file)
@@ -379,7 +379,7 @@ genX(cmd_buffer_flush_compute_state)(struct anv_cmd_buffer *cmd_buffer)
 {
    struct anv_pipeline *pipeline = cmd_buffer->state.compute_pipeline;
    const struct brw_cs_prog_data *cs_prog_data = get_cs_prog_data(pipeline);
-   VkResult result;
+   MAYBE_UNUSED VkResult result;
 
    assert(pipeline->active_stages == VK_SHADER_STAGE_COMPUTE_BIT);
 
index 47a9d71f91e264ebef2904bfbc15461984008f8e..d078dac8ca3d35bb213cf72f3a1d9d3dab31652b 100644 (file)
@@ -444,7 +444,7 @@ genX(cmd_buffer_flush_compute_state)(struct anv_cmd_buffer *cmd_buffer)
 {
    struct anv_pipeline *pipeline = cmd_buffer->state.compute_pipeline;
    const struct brw_cs_prog_data *cs_prog_data = get_cs_prog_data(pipeline);
-   VkResult result;
+   MAYBE_UNUSED VkResult result;
 
    assert(pipeline->active_stages == VK_SHADER_STAGE_COMPUTE_BIT);