From: Chris Michael Date: Wed, 19 Apr 2017 14:57:43 +0000 (-0400) Subject: ecore-con: Remove unused variable X-Git-Tag: upstream/1.20.0~1442 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0652fbe91cf348cf02c7300c3e40b95e6247324c;p=platform%2Fupstream%2Fefl.git ecore-con: Remove unused variable Gcc complains that 'flags' here may be used uninitialized. In looking at the code, 'flags' does not seem to be needed in the debug prints here. If we keep and initialize the variable to 0 during declaration, it would only ever print out 0 anyway as 'flags' is never changed in the code. @fix Signed-off-by: Chris Michael --- diff --git a/src/lib/ecore_con/efl_net_dialer_http.c b/src/lib/ecore_con/efl_net_dialer_http.c index 8bc273a..68cb83f 100644 --- a/src/lib/ecore_con/efl_net_dialer_http.c +++ b/src/lib/ecore_con/efl_net_dialer_http.c @@ -1773,7 +1773,6 @@ _efl_net_dialer_http_efl_io_closer_close_on_exec_set(Eo *o EINA_UNUSED, Efl_Net_ pd->close_on_exec = close_on_exec; return EINA_FALSE; #else - int flags; Eina_Bool old = pd->close_on_exec; pd->close_on_exec = close_on_exec; @@ -1782,7 +1781,7 @@ _efl_net_dialer_http_efl_io_closer_close_on_exec_set(Eo *o EINA_UNUSED, Efl_Net_ if (!eina_file_close_on_exec(pd->fd, close_on_exec)) { - ERR("fcntl(" SOCKET_FMT ", F_SETFD, %#x): %s", pd->fd, flags, strerror(errno)); + ERR("fcntl(" SOCKET_FMT ", F_SETFD): %s", pd->fd, strerror(errno)); pd->close_on_exec = old; return EINA_FALSE; } diff --git a/src/lib/ecore_con/efl_net_server_fd.c b/src/lib/ecore_con/efl_net_server_fd.c index de699b2..03448ec 100644 --- a/src/lib/ecore_con/efl_net_server_fd.c +++ b/src/lib/ecore_con/efl_net_server_fd.c @@ -270,7 +270,6 @@ _efl_net_server_fd_close_on_exec_set(Eo *o, Efl_Net_Server_Fd_Data *pd, Eina_Boo { #ifdef FD_CLOEXEC SOCKET fd; - int flags; Eina_Bool old = pd->close_on_exec; #endif @@ -282,7 +281,7 @@ _efl_net_server_fd_close_on_exec_set(Eo *o, Efl_Net_Server_Fd_Data *pd, Eina_Boo if (!eina_file_close_on_exec(fd, close_on_exec)) { - ERR("fcntl(" SOCKET_FMT ", F_SETFD, %#x): %s", fd, flags, strerror(errno)); + ERR("fcntl(" SOCKET_FMT ", F_SETFD,): %s", fd, strerror(errno)); pd->close_on_exec = old; return EINA_FALSE; }