radv: mark total_count as MAYBE_UNUSED in CmdSet{Viewport,Scissor}
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Fri, 20 Oct 2017 09:21:27 +0000 (11:21 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Fri, 20 Oct 2017 09:22:19 +0000 (11:22 +0200)
Fixes two compilation warnings in release build. Trivial.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
src/amd/vulkan/radv_cmd_buffer.c

index d5a91333e9604c570f4d123816700cf7bdd7d0c0..2d59e4756391d728c6687a3e17c1d2c129c5ea16 100644 (file)
@@ -2552,7 +2552,7 @@ void radv_CmdSetViewport(
        const VkViewport*                           pViewports)
 {
        RADV_FROM_HANDLE(radv_cmd_buffer, cmd_buffer, commandBuffer);
-       const uint32_t total_count = firstViewport + viewportCount;
+       MAYBE_UNUSED const uint32_t total_count = firstViewport + viewportCount;
 
        assert(firstViewport < MAX_VIEWPORTS);
        assert(total_count >= 1 && total_count <= MAX_VIEWPORTS);
@@ -2570,7 +2570,7 @@ void radv_CmdSetScissor(
        const VkRect2D*                             pScissors)
 {
        RADV_FROM_HANDLE(radv_cmd_buffer, cmd_buffer, commandBuffer);
-       const uint32_t total_count = firstScissor + scissorCount;
+       MAYBE_UNUSED const uint32_t total_count = firstScissor + scissorCount;
 
        assert(firstScissor < MAX_SCISSORS);
        assert(total_count >= 1 && total_count <= MAX_SCISSORS);