Fix uninitialized value issue detected by static analysis tool 30/113630/1
authorJihoon Kim <jihoon48.kim@samsung.com>
Wed, 8 Feb 2017 08:09:56 +0000 (17:09 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Wed, 8 Feb 2017 08:09:56 +0000 (17:09 +0900)
Change-Id: I3f93b7434b8f6fbd2cac985a74e939a98c62dc95
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
scl/sclcontext.cpp
scl/sclcontroller.cpp

index c18bea9..7ba84c8 100644 (file)
@@ -84,6 +84,9 @@ CSCLContext::reset()
     m_last_pressed_window = SCLWINDOW_INVALID;
     m_last_pressed_key = NOT_USED;
 
+    m_last_event_fired_window = SCLWINDOW_INVALID;
+    m_last_event_fired_key = NOT_USED;
+
     memset(m_cur_sub_layout, 0x00, sizeof(m_cur_sub_layout));
 }
 
index 38b3217..9d36e59 100644 (file)
@@ -3646,7 +3646,7 @@ CSCLController::timer_event(const scl32 data)
     case SCL_TIMER_AUTOTEST: {
         srand(time(NULL));
 
-        unsigned int seed;
+        unsigned int seed = 0;
         sclint rnd = rand_r(&seed) % 100;
 
         const SclLayout *layout = cache->get_cur_layout(windows->get_base_window());