ecore-con: Remove unused variable
authorChris Michael <cp.michael@samsung.com>
Wed, 19 Apr 2017 14:57:43 +0000 (10:57 -0400)
committerChris Michael <cp.michael@samsung.com>
Wed, 19 Apr 2017 14:57:43 +0000 (10:57 -0400)
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 <cp.michael@samsung.com>
src/lib/ecore_con/efl_net_dialer_http.c
src/lib/ecore_con/efl_net_server_fd.c

index 8bc273a..68cb83f 100644 (file)
@@ -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;
      }
index de699b2..03448ec 100644 (file)
@@ -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;
      }