aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavi Artigas <xavierartigas@yahoo.es>2019-09-16 10:01:31 -0400
committerMike Blumenkrantz <zmike@samsung.com>2019-09-16 10:14:53 -0400
commitb0c3062e246a1f39835f783d345f71e5db3ba4ce (patch)
tree544a36de4f9787ea85151bff642d51e1d44fe1d1
parentelm_config: fix a missing of free after using (diff)
downloadefl-b0c3062e246a1f39835f783d345f71e5db3ba4ce.tar.gz
elm/datepicker, timepicker: Fix uninitialized vars
Summary: Should fix all timepicker and datepicker uninitializer variable usage detected by Coverity: 1396954 Uninitialized scalar variable: efl_ui_timepicker.c 1396978 Uninitialized scalar variable: efl_ui_timepicker.c 1397006 Uninitialized scalar variable: efl_ui_timepicker.c 1396979 Uninitialized scalar variable: efl_ui_datepicker.c 1404748 Uninitialized scalar variable: efl_ui_datepicker.c 1404757 Uninitialized scalar variable: efl_ui_datepicker.c Test Plan: Everything builds and passes tests. Coverity should complain less. Reviewers: stefan_schmidt, zmike Reviewed By: zmike Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9967
-rw-r--r--src/lib/elementary/efl_ui_datepicker.c2
-rw-r--r--src/lib/elementary/efl_ui_timepicker.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/elementary/efl_ui_datepicker.c b/src/lib/elementary/efl_ui_datepicker.c
index 6a9cbb4d24..8a6ee63985 100644
--- a/src/lib/elementary/efl_ui_datepicker.c
+++ b/src/lib/elementary/efl_ui_datepicker.c
@@ -23,7 +23,7 @@
#define DATE_SET() \
do { \
- Efl_Time t; \
+ Efl_Time t = { 0 }; \
t.tm_year = pd->cur_date[DATEPICKER_YEAR] - 1900; \
t.tm_mon = pd->cur_date[DATEPICKER_MONTH] - 1; \
t.tm_mday = pd->cur_date[DATEPICKER_DAY] - 1; \
diff --git a/src/lib/elementary/efl_ui_timepicker.c b/src/lib/elementary/efl_ui_timepicker.c
index ba6917b4ee..2fc578dd61 100644
--- a/src/lib/elementary/efl_ui_timepicker.c
+++ b/src/lib/elementary/efl_ui_timepicker.c
@@ -22,7 +22,7 @@
#define TIME_SET() \
do { \
- Efl_Time t; \
+ Efl_Time t = { 0 }; \
t.tm_hour = pd->cur_time[TIMEPICKER_HOUR]; \
t.tm_min = pd->cur_time[TIMEPICKER_MIN]; \
efl_datetime_manager_value_set(pd->dt_manager, t); \