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

Bas Nieuwenhuizen bas at basnieuwenhuizen.nl
Mon Jan 30 23:00:51 UTC 2017


Pushed, thanks.

On Mon, Jan 30, 2017, at 22:26, Robert Foss wrote:
> 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
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list