From 5fc7829c9675a0fae60332934b60b3734dee20ad Mon Sep 17 00:00:00 2001 From: Cedric Bail Date: Sun, 10 Mar 2013 11:41:20 +0100 Subject: [PATCH] eina, evil: fix warning on 64 bits --- src/lib/eina/eina_value.c | 8 +++++--- src/lib/evil/evil_unistd.c | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/lib/eina/eina_value.c b/src/lib/eina/eina_value.c index b245b67288..d7fe84ae30 100644 --- a/src/lib/eina/eina_value.c +++ b/src/lib/eina/eina_value.c @@ -3539,10 +3539,12 @@ _eina_value_type_timeval_convert_to(const Eina_Value_Type *type EINA_UNUSED, con else if (convert == EINA_VALUE_TYPE_STRINGSHARE || convert == EINA_VALUE_TYPE_STRING) { - const char *other_mem; char buf[64]; - strftime - (buf, sizeof(buf), "%Y-%m-%d %H:%M:%S", localtime(&(v.tv_sec))); + const char *other_mem; + time_t t; + + t = v.tv_sec; + strftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S", localtime(&t)); other_mem = buf; /* required due &buf == buf */ return eina_value_type_pset(convert, convert_mem, &other_mem); } diff --git a/src/lib/evil/evil_unistd.c b/src/lib/evil/evil_unistd.c index cfa5320aba..31c018a2f6 100644 --- a/src/lib/evil/evil_unistd.c +++ b/src/lib/evil/evil_unistd.c @@ -407,8 +407,8 @@ evil_pipe(int *fds) out0: closesocket (temp); - fds[0] = INVALID_SOCKET; - fds[1] = INVALID_SOCKET; + fds[0] = -1; + fds[1] = -1; return -1; }