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>
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;
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;
}
{
#ifdef FD_CLOEXEC
SOCKET fd;
- int flags;
Eina_Bool old = pd->close_on_exec;
#endif
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;
}