From: Pierre Moreau Date: Fri, 12 May 2017 09:01:32 +0000 (+0200) Subject: nv50/ir: Report wrong prog types using proper var X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=840f6beb81a5b51d782d54e9064af0ba193b221a;p=mesa.git nv50/ir: Report wrong prog types using proper var Coverity caught the use of the uninitialised variable `type`. However, it was `info->type`, which is initialised, which was meant to be used. CID: 1406000 Reported-by: Ilia Mirkin Fixes: b490ca9a387d ("nv50/ir: Fail if encountering unknown shader type") Signed-off-by: Pierre Moreau Reviewed-by: Samuel Pitoiset --- diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir.cpp index a000bcbd32f..21641a4746c 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir.cpp @@ -1214,7 +1214,7 @@ nv50_ir_generate_code(struct nv50_ir_prog_info *info) PROG_TYPE_CASE(FRAGMENT, FRAGMENT); PROG_TYPE_CASE(COMPUTE, COMPUTE); default: - INFO_DBG(info->dbgFlags, VERBOSE, "unsupported program type %u\n", type); + INFO_DBG(info->dbgFlags, VERBOSE, "unsupported program type %u\n", info->type); return -1; } INFO_DBG(info->dbgFlags, VERBOSE, "translating program of type %u\n", type);