Author: tschoening Date: Thu Oct 8 14:35:33 2015 New Revision: 1707550 URL: http://svn.apache.org/viewvc?rev=1707550&view=rev Log: Removed warning about unreachable code by making it reachable. Normally I do prefer early returns as wlel, but I guess the return NULL in this case has been left by purpose because some compilers7IDEs warn about the method should return some value else. Ignoring the warnign with #pragma seemed to much overhead, because that would need to be compiler specific.
Modified: incubator/log4cxx/trunk/src/main/cpp/telnetappender.cpp Modified: incubator/log4cxx/trunk/src/main/cpp/telnetappender.cpp URL: http://svn.apache.org/viewvc/incubator/log4cxx/trunk/src/main/cpp/telnetappender.cpp?rev=1707550&r1=1707549&r2=1707550&view=diff ============================================================================== --- incubator/log4cxx/trunk/src/main/cpp/telnetappender.cpp (original) +++ incubator/log4cxx/trunk/src/main/cpp/telnetappender.cpp Thu Oct 8 14:35:33 2015 @@ -204,7 +204,8 @@ void* APR_THREAD_FUNC TelnetAppender::ac Pool p; pThis->writeStatus(newClient, LOG4CXX_STR("Log closed.\r\n"), p); newClient->close(); - return NULL; + + break; } size_t count = pThis->activeConnections; @@ -223,6 +224,7 @@ void* APR_THREAD_FUNC TelnetAppender::ac if (*iter == NULL) { *iter = newClient; pThis->activeConnections++; + break; } } @@ -235,13 +237,13 @@ void* APR_THREAD_FUNC TelnetAppender::ac } } catch(InterruptedIOException &e) { if (pThis->closed) { - return NULL; + break; } } catch(Exception& e) { if (!pThis->closed) { LogLog::error(LOG4CXX_STR("Encountered error while in SocketHandler loop."), e); } else { - return NULL; + break; } } }