[Libreoffice-commits] .: sal/osl
Cédric Bosdonnat
cbosdo at kemper.freedesktop.org
Tue Feb 8 09:51:53 PST 2011
sal/osl/w32/diagnose.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
New commits:
commit 656b6086318473b4fb3c35cc15afda408e6edcb7
Author: Kayo Hamid <revol.code at yahoo.com>
Date: Tue Feb 8 18:33:58 2011 +0100
cppcheck: variableScope fixes
diff --git a/sal/osl/w32/diagnose.c b/sal/osl/w32/diagnose.c
index 1990164..fb97a91 100644
--- a/sal/osl/w32/diagnose.c
+++ b/sal/osl/w32/diagnose.c
@@ -71,7 +71,6 @@ void SAL_CALL osl_breakDebug(void)
void SAL_CALL osl_trace(const sal_Char* lpszFormat, ...)
{
va_list args;
- int written = 0;
va_start(args, lpszFormat);
@@ -88,7 +87,7 @@ void SAL_CALL osl_trace(const sal_Char* lpszFormat, ...)
if ( IsDebuggerPresent() )
{
sal_Char szMessage[512];
- written = _vsnprintf( szMessage, sizeof(szMessage) - 2, lpszFormat, args );
+ int written = _vsnprintf( szMessage, sizeof(szMessage) - 2, lpszFormat, args );
if ( written == -1 )
written = sizeof(szMessage) - 2;
szMessage[ written++ ] = '\n';
@@ -112,7 +111,6 @@ sal_Bool SAL_CALL osl_assertFailedLine(const sal_Char* pszFileName, sal_Int32 nL
#else
HWND hWndParent;
UINT nFlags;
- int nCode;
/* get app name or NULL if unknown (don't call assert) */
LPCSTR lpszAppName = "Error";
@@ -149,7 +147,7 @@ sal_Bool SAL_CALL osl_assertFailedLine(const sal_Char* pszFileName, sal_Int32 nL
_snprintf(szBoxMessage, sizeof(szBoxMessage)-1, "%s\n( Yes=Abort / No=Ignore / Cancel=Debugger )",
szMessage);
- nCode = MessageBox(hWndParent, szBoxMessage, "Assertion Failed!", nFlags);
+ int nCode = MessageBox(hWndParent, szBoxMessage, "Assertion Failed!", nFlags);
if (nCode == IDYES)
FatalExit(-1);
More information about the Libreoffice-commits
mailing list