summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth Venken <kenneth.venken@gmail.com>2011-01-25 18:39:38 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-01-26 20:21:52 +0000
commit3332802ff5c765b7b08297a77e24b701eb5ccd47 (patch)
tree2f9a114c78d9d40c0b8ed18c3a658f7acab8856d
parentdd9197c7fb95be7c1eb1fe25bf78eadcb447b77c (diff)
Cpp cleanliness: redundant assignment to self
-rw-r--r--sal/osl/w32/diagnose.c6
-rw-r--r--sal/osl/w32/file_dirvol.cxx12
-rw-r--r--sal/osl/w32/module.cxx4
-rw-r--r--sal/osl/w32/socket.cxx6
-rw-r--r--sal/osl/w32/util.c3
5 files changed, 9 insertions, 22 deletions
diff --git a/sal/osl/w32/diagnose.c b/sal/osl/w32/diagnose.c
index 58f02de8a86f..382b0c8e5c03 100644
--- a/sal/osl/w32/diagnose.c
+++ b/sal/osl/w32/diagnose.c
@@ -161,10 +161,10 @@ sal_Bool SAL_CALL osl_assertFailedLine(const sal_Char* pszFileName, sal_Int32 nL
return sal_True; /* will cause oslDebugBreak */
}
#endif /* NO_DEBUG_CRT */
- return sal_False; /* not shure, not care */
+ return sal_False; /* not sure, don't care */
}
-sal_Int32 SAL_CALL osl_reportError(sal_uInt32 nType, const sal_Char* pszMessage)
+sal_Int32 SAL_CALL osl_reportError(sal_uInt32 /*nType*/, const sal_Char* pszMessage)
{
UINT nFlags;
int nDisposition;
@@ -174,8 +174,6 @@ sal_Int32 SAL_CALL osl_reportError(sal_uInt32 nType, const sal_Char* pszMessage)
if (hWndParent != NULL)
hWndParent = GetLastActivePopup(hWndParent);
- nType = nType; /* avoid warnings */
-
/* set message box flags */
nFlags = MB_TASKMODAL | MB_ICONERROR | MB_YESNOCANCEL | MB_DEFBUTTON2 | MB_SETFOREGROUND;
if (hWndParent == NULL)
diff --git a/sal/osl/w32/file_dirvol.cxx b/sal/osl/w32/file_dirvol.cxx
index 3b0529f1e713..95e68e6e1817 100644
--- a/sal/osl/w32/file_dirvol.cxx
+++ b/sal/osl/w32/file_dirvol.cxx
@@ -844,7 +844,7 @@ oslFileError SAL_CALL osl_openDirectory(rtl_uString *strDirectoryPath, oslDirect
//#####################################################
static oslFileError SAL_CALL osl_getNextNetResource(
- oslDirectory Directory, oslDirectoryItem *pItem, sal_uInt32 uHint )
+ oslDirectory Directory, oslDirectoryItem *pItem, sal_uInt32 /*uHint*/ )
{
Directory_Impl *pDirImpl = (Directory_Impl *)Directory;
DirectoryItem_Impl *pItemImpl = NULL;
@@ -852,8 +852,6 @@ static oslFileError SAL_CALL osl_getNextNetResource(
LPNETRESOURCEW lpNetResource = (LPNETRESOURCEW)buffer;
DWORD dwError, dwCount, dwBufSize;
- uHint = uHint; /* to get no warning */
-
if ( !pItem )
return osl_File_E_INVAL;
*pItem = NULL;
@@ -892,14 +890,12 @@ static oslFileError SAL_CALL osl_getNextNetResource(
//#####################################################
static oslFileError SAL_CALL osl_getNextDrive(
- oslDirectory Directory, oslDirectoryItem *pItem, sal_uInt32 uHint )
+ oslDirectory Directory, oslDirectoryItem *pItem, sal_uInt32 /*uHint*/ )
{
Directory_Impl *pDirImpl = (Directory_Impl *)Directory;
DirectoryItem_Impl *pItemImpl = NULL;
BOOL fSuccess;
- uHint = uHint; /* avoid warnings */
-
if ( !pItem )
return osl_File_E_INVAL;
*pItem = NULL;
@@ -936,14 +932,12 @@ static oslFileError SAL_CALL osl_getNextDrive(
//#####################################################
static oslFileError SAL_CALL osl_getNextFileItem(
- oslDirectory Directory, oslDirectoryItem *pItem, sal_uInt32 uHint)
+ oslDirectory Directory, oslDirectoryItem *pItem, sal_uInt32 /*uHint*/)
{
Directory_Impl *pDirImpl = (Directory_Impl *)Directory;
DirectoryItem_Impl *pItemImpl = NULL;
BOOL fFound;
- uHint = uHint; /* avoid warnings */
-
if ( !pItem )
return osl_File_E_INVAL;
*pItem = NULL;
diff --git a/sal/osl/w32/module.cxx b/sal/osl/w32/module.cxx
index 870eb7533b72..1c2c485a6ca7 100644
--- a/sal/osl/w32/module.cxx
+++ b/sal/osl/w32/module.cxx
@@ -46,7 +46,7 @@
/*****************************************************************************/
/* osl_loadModule */
/*****************************************************************************/
-oslModule SAL_CALL osl_loadModule(rtl_uString *strModuleName, sal_Int32 nRtldMode )
+oslModule SAL_CALL osl_loadModule(rtl_uString *strModuleName, sal_Int32 /*nRtldMode*/ )
{
HINSTANCE hInstance;
#if OSL_DEBUG_LEVEL < 2
@@ -60,8 +60,6 @@ oslModule SAL_CALL osl_loadModule(rtl_uString *strModuleName, sal_Int32 nRtldMod
OSL_ASSERT(strModuleName);
- nRtldMode = nRtldMode; /* avoid warnings */
-
nError = osl_getSystemPathFromFileURL(strModuleName, &Module);
if ( osl_File_E_None != nError )
diff --git a/sal/osl/w32/socket.cxx b/sal/osl/w32/socket.cxx
index fc9a7a5eed4f..ebef9b106d88 100644
--- a/sal/osl/w32/socket.cxx
+++ b/sal/osl/w32/socket.cxx
@@ -308,9 +308,9 @@ static oslSocketDialupImpl* __osl_createSocketDialupImpl (void)
*/
static void __osl_initSocketDialupImpl (oslSocketDialupImpl *pImpl)
{
-#ifdef SOCKET_USE_AUTODIAL
if (pImpl)
{
+#ifdef SOCKET_USE_AUTODIAL
HINSTANCE hModule;
EnterCriticalSection (&pImpl->m_hMutex);
@@ -330,10 +330,8 @@ static void __osl_initSocketDialupImpl (oslSocketDialupImpl *pImpl)
}
LeaveCriticalSection (&pImpl->m_hMutex);
- }
-#else
- pImpl = pImpl; /* avoid warnings */
#endif
+ }
}
/*
diff --git a/sal/osl/w32/util.c b/sal/osl/w32/util.c
index 1b5b8ca4c006..f661c9c7fdbc 100644
--- a/sal/osl/w32/util.c
+++ b/sal/osl/w32/util.c
@@ -30,9 +30,8 @@
-extern sal_Bool SAL_CALL osl_getEthernetAddress( sal_uInt8 *pAddr )
+extern sal_Bool SAL_CALL osl_getEthernetAddress( sal_uInt8* /*pAddr*/ )
{
- pAddr = pAddr; /* avoid warnings */
return sal_False;
}