nv50/ir: Initialize Converter members.
authorVinson Lee <vlee@freedesktop.org>
Fri, 11 Sep 2020 22:49:50 +0000 (15:49 -0700)
committerMarge Bot <eric+marge@anholt.net>
Mon, 14 Sep 2020 22:44:39 +0000 (22:44 +0000)
Fix defects reported by Coverity Scan.

Uninitialized pointer field (UNINIT_CTOR)
Non-static class member exit is not initialized in this
constructor nor in any functions that it calls
Non-static class member immInsertPos is not initialized in this
constructor nor in any functions that it calls.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6695>

src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp

index b0b5de7..e2f83e4 100644 (file)
@@ -198,6 +198,8 @@ Converter::Converter(Program *prog, nir_shader *nir, nv50_ir_prog_info *info,
      nir(nir),
      curLoopDepth(0),
      curIfDepth(0),
+     exit(NULL),
+     immInsertPos(NULL),
      clipVertexOutput(-1)
 {
    zero = mkImm((uint32_t)0);