summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Chaffraix <julien.chaffraix@gmail.com>2011-04-12 06:56:47 -0700
committerThorsten Behrens <tbehrens@novell.com>2011-04-14 12:27:54 +0200
commit702be0bff5fb9ebbd3367ba72d472677e1b7f6eb (patch)
treefd9948316771bdf27c84c962a80b60107bdaf7e6
parente437226fc306041dba92b8d28c604e7f4262928d (diff)
Fixed some false positives 'dead assignments' seen in CLang++
We removed the OSL_DEBUG_LEVEL > 1 code and replace them with OSL_TRACE. This should provide the same coverage and remove CLang++ complains.
-rw-r--r--sal/osl/unx/pipe.c4
-rw-r--r--sal/osl/unx/socket.c12
2 files changed, 4 insertions, 12 deletions
diff --git a/sal/osl/unx/pipe.c b/sal/osl/unx/pipe.c
index 38a14134d..1ae6fb4fc 100644
--- a/sal/osl/unx/pipe.c
+++ b/sal/osl/unx/pipe.c
@@ -359,12 +359,10 @@ void SAL_CALL osl_closePipe( oslPipe pPipe )
len = sizeof(addr);
nRet = connect( fd, (struct sockaddr *)&addr, len);
-#if OSL_DEBUG_LEVEL > 1
if ( nRet < 0 )
{
- perror("connect in osl_destroyPipe");
+ OSL_TRACE("connect in osl_destroyPipe failed with error: %s", strerror(errno));
}
-#endif /* OSL_DEBUG_LEVEL */
close(fd);
}
#endif /* LINUX */
diff --git a/sal/osl/unx/socket.c b/sal/osl/unx/socket.c
index 3f317791f..b9fb92e42 100644
--- a/sal/osl/unx/socket.c
+++ b/sal/osl/unx/socket.c
@@ -1705,12 +1705,10 @@ void SAL_CALL osl_closeSocket(oslSocket pSocket)
socklen_t nSockLen = sizeof(s.aSockAddr);
nRet = getsockname(nFD, &s.aSockAddr, &nSockLen);
-#if OSL_DEBUG_LEVEL > 1
if ( nRet < 0 )
{
- perror("getsockname");
+ OSL_TRACE("getsockname call failed with error: %s", strerror(errno));
}
-#endif /* OSL_DEBUG_LEVEL */
if ( s.aSockAddr.sa_family == AF_INET )
{
@@ -1720,20 +1718,16 @@ void SAL_CALL osl_closeSocket(oslSocket pSocket)
}
nConnFD = socket(AF_INET, SOCK_STREAM, 0);
-#if OSL_DEBUG_LEVEL > 1
if ( nConnFD < 0 )
{
- perror("socket");
+ OSL_TRACE("socket call failed with error: %s", strerror(errno));
}
-#endif /* OSL_DEBUG_LEVEL */
nRet = connect(nConnFD, &s.aSockAddr, sizeof(s.aSockAddr));
-#if OSL_DEBUG_LEVEL > 1
if ( nRet < 0 )
{
- perror("connect");
+ OSL_TRACE("connect call failed with error: %s", strerror(errno));
}
-#endif /* OSL_DEBUG_LEVEL */
close(nConnFD);
}
pSocket->m_bIsAccepting = sal_False;