[Mesa-dev] [PATCH v1] radv: Prevent Coverity warning

Robert Foss robert.foss at collabora.com
Mon Jan 30 21:26:58 UTC 2017


Prevent Coverity seeing potential errors when src is
no initialized in the switch case.

Coverity-Id: 1396397
Signed-off-by: Robert Foss <robert.foss at collabora.com>
---

Patch can be found here:
  https://git.collabora.com/cgit/user/robertfoss/mesa.git/log/?h=cov_1396397_v1

 src/amd/vulkan/radv_cmd_buffer.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c
index c4e8324a33..c671e78523 100644
--- a/src/amd/vulkan/radv_cmd_buffer.c
+++ b/src/amd/vulkan/radv_cmd_buffer.c
@@ -415,6 +415,8 @@ radv_update_multisample_state(struct radv_cmd_buffer *cmd_buffer,
 	case 16:
 		src = cmd_buffer->device->sample_locations_16x;
 		break;
+	default:
+		unreachable("unknown number of samples");
 	}
 	memcpy(samples_ptr, src, num_samples * 4 * 2);
 
-- 
2.11.0.453.g787f75f05



More information about the mesa-dev mailing list