瀏覽代碼

HPCC-18992 Fix coverity warning

No user-observable ill-effects, but worth fixing.

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 7 年之前
父節點
當前提交
df972f4542
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      plugins/py3embed/py3embed.cpp

+ 3 - 3
plugins/py3embed/py3embed.cpp

@@ -473,9 +473,9 @@ protected:
         out.appendf("__result__ = __user__(%s)\n", params);
         return out;
     }
-    PyThreadState *tstate;
-    bool initialized;
-    HINSTANCE pythonLibrary;
+    PyThreadState *tstate = nullptr;
+    bool initialized = false;
+    HINSTANCE pythonLibrary = 0;
     OwnedPyObject namedtuple;      // collections.namedtuple
     OwnedPyObject namedtupleTypes; // dictionary of return values from namedtuple()
     OwnedPyObject compiledScripts; // dictionary of previously compiled scripts