elementary: Fix warnings
elm_prefs.c:683:17: warning: missing initializer [-Wmissing-field-initializers] elm_prefs.c:683:17: warning: (near initialization for 'val.tv_usec') [-Wmissing-field-initializers] elm_prefs.c:684:20: warning: declaration of 'time' shadows a global declaration [-Wshadow] Signed-off-by: Mike McCormack <mikem@atratus.org> SVN revision: 80198
This commit is contained in:
parent
33c4cb55e7
commit
369eaedb5b
|
@ -680,13 +680,16 @@ _prefs_item_widget_value_from_self(Elm_Prefs_Item_Node *it,
|
||||||
|
|
||||||
case ELM_PREFS_TYPE_DATE:
|
case ELM_PREFS_TYPE_DATE:
|
||||||
{
|
{
|
||||||
struct timeval val = {0};
|
struct timeval val;
|
||||||
struct tm time = {0};
|
struct tm t;
|
||||||
|
|
||||||
time.tm_year = it->spec.d.def.y - 1900;
|
memset(&t, 0, sizeof t);
|
||||||
time.tm_mon = it->spec.d.def.m - 1;
|
memset(&val, 0, sizeof val);
|
||||||
time.tm_mday = it->spec.d.def.d;
|
|
||||||
val.tv_sec = mktime(&time);
|
t.tm_year = it->spec.d.def.y - 1900;
|
||||||
|
t.tm_mon = it->spec.d.def.m - 1;
|
||||||
|
t.tm_mday = it->spec.d.def.d;
|
||||||
|
val.tv_sec = mktime(&t);
|
||||||
|
|
||||||
if (!eina_value_setup(&value, EINA_VALUE_TYPE_TIMEVAL)) goto err;
|
if (!eina_value_setup(&value, EINA_VALUE_TYPE_TIMEVAL)) goto err;
|
||||||
if (!eina_value_set(&value, val))
|
if (!eina_value_set(&value, val))
|
||||||
|
|
Loading…
Reference in New Issue