[Libreoffice-commits] .: 2 commits - sal/osl
Caolán McNamara
caolan at kemper.freedesktop.org
Wed Jan 26 12:24:20 PST 2011
sal/osl/w32/diagnose.c | 6 ++----
sal/osl/w32/file_dirvol.cxx | 12 +++---------
sal/osl/w32/module.cxx | 6 ++----
sal/osl/w32/socket.cxx | 2 +-
sal/osl/w32/util.c | 3 +--
5 files changed, 9 insertions(+), 20 deletions(-)
New commits:
commit 6715da8755246f78bad0eb897629d6244a5de485
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Jan 26 20:24:07 2011 +0000
tweak this slightly differently
diff --git a/sal/osl/w32/socket.cxx b/sal/osl/w32/socket.cxx
index b53d25f..7acf7a5 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,8 +330,10 @@ static void __osl_initSocketDialupImpl (oslSocketDialupImpl *pImpl)
}
LeaveCriticalSection (&pImpl->m_hMutex);
-#endif
}
+#else
+ (void)pImpl;
+#endif
}
/*
commit 6919a6909bc11dc286cd6481a866681cb4145f47
Author: Kenneth Venken <kenneth.venken at gmail.com>
Date: Tue Jan 25 18:39:38 2011 +0100
Cpp cleanliness: redundant assignment to self
diff --git a/sal/osl/w32/diagnose.c b/sal/osl/w32/diagnose.c
index caf511a..48a57d7 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;
@@ -173,8 +173,6 @@ sal_Int32 SAL_CALL osl_reportError(sal_uInt32 nType, const sal_Char* pszMessage)
HWND hWndParent = GetActiveWindow();
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;
diff --git a/sal/osl/w32/file_dirvol.cxx b/sal/osl/w32/file_dirvol.cxx
index 85d067f..fe63d19 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,13 +890,11 @@ 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;
@@ -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 11461af..1c35135 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
@@ -59,9 +59,7 @@ oslModule SAL_CALL osl_loadModule(rtl_uString *strModuleName, sal_Int32 nRtldMod
RTL_LOGFILE_TRACE1( "{ osl_loadModule start: %S", (LPTSTR)&strModuleName->buffer );
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 e758fdc..b53d25f 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 2687683..4a1a11f 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;
}
More information about the Libreoffice-commits
mailing list