From 6a442192d456456545a7ffdd6ae47da9d9a8f447 Mon Sep 17 00:00:00 2001 From: CHP Date: Mon, 10 Sep 2018 05:23:14 +0200 Subject: [PATCH] Fix uninitialized variables problems found by drmemory (#19028) --- cocos/ui/UIEditBox/UIEditBoxImpl-win32.cpp | 1 + tests/cpp-tests/Classes/Camera3DTest/Camera3DTest.cpp | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/cocos/ui/UIEditBox/UIEditBoxImpl-win32.cpp b/cocos/ui/UIEditBox/UIEditBoxImpl-win32.cpp index 7be7aacc8b..b87387595b 100644 --- a/cocos/ui/UIEditBox/UIEditBoxImpl-win32.cpp +++ b/cocos/ui/UIEditBox/UIEditBoxImpl-win32.cpp @@ -71,6 +71,7 @@ namespace ui { EditBoxImplWin::EditBoxImplWin(EditBox* pEditText) : EditBoxImplCommon(pEditText), + _hwndEdit(NULL), _changedTextManually(false), _hasFocus(false), _endAction(EditBoxDelegate::EditBoxEndAction::UNKNOWN) diff --git a/tests/cpp-tests/Classes/Camera3DTest/Camera3DTest.cpp b/tests/cpp-tests/Classes/Camera3DTest/Camera3DTest.cpp index 0a4c37acf1..9302cec058 100644 --- a/tests/cpp-tests/Classes/Camera3DTest/Camera3DTest.cpp +++ b/tests/cpp-tests/Classes/Camera3DTest/Camera3DTest.cpp @@ -176,7 +176,8 @@ void CameraRotationTest::update(float dt) // //------------------------------------------------------------------ Camera3DTestDemo::Camera3DTestDemo(void) -: _incRot(nullptr) +: _cameraType(CameraType::Free) +, _incRot(nullptr) , _decRot(nullptr) , _camera(nullptr) , _bZoomOut(false)