[Mesa-dev] [PATCH] i965: Initialize brw_blorp_const_color_program::prog_data.
Kenneth Graunke
kenneth at whitecape.org
Thu Jul 25 23:19:25 PDT 2013
On 07/25/2013 10:48 PM, Vinson Lee wrote:
> Fixes "Uninitialized scalar field" defect reported by Coverity.
>
> Signed-off-by: Vinson Lee <vlee at freedesktop.org>
> ---
> src/mesa/drivers/dri/i965/brw_blorp_clear.cpp | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_blorp_clear.cpp b/src/mesa/drivers/dri/i965/brw_blorp_clear.cpp
> index f26f39d..5234208 100644
> --- a/src/mesa/drivers/dri/i965/brw_blorp_clear.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_blorp_clear.cpp
> @@ -119,7 +119,8 @@ private:
> brw_blorp_const_color_program::brw_blorp_const_color_program(
> struct brw_context *brw,
> const brw_blorp_const_color_prog_key *key)
> - : mem_ctx(ralloc_context(NULL)),
> + : prog_data(),
> + mem_ctx(ralloc_context(NULL)),
> brw(brw),
> key(key),
> R0(),
>
NAK. Since brw_blorp_prog_data doesn't define a constructor (see
brw_blorp.h:196), adding prog_data() is just a call to the C++
default/empty constructor.
So this patch doesn't actually initialize anything at all.
More information about the mesa-dev
mailing list