summaryrefslogtreecommitdiff
path: root/extensions/source
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/source')
-rw-r--r--extensions/source/logging/plaintextformatter.cxx10
-rw-r--r--extensions/source/scanner/sane.cxx8
-rw-r--r--extensions/source/scanner/sane.hxx4
3 files changed, 11 insertions, 11 deletions
diff --git a/extensions/source/logging/plaintextformatter.cxx b/extensions/source/logging/plaintextformatter.cxx
index 2a8713747c37..fb12de2f1b8d 100644
--- a/extensions/source/logging/plaintextformatter.cxx
+++ b/extensions/source/logging/plaintextformatter.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: plaintextformatter.cxx,v $
- * $Revision: 1.4 $
+ * $Revision: 1.4.82.1 $
*
* This file is part of OpenOffice.org.
*
@@ -132,10 +132,10 @@ namespace logging
::rtl::OUString SAL_CALL PlainTextFormatter::format( const LogRecord& _rRecord ) throw (RuntimeException)
{
char buffer[ 30 ];
- const size_t buffer_size = sizeof( buffer );
- size_t used = snprintf( buffer, buffer_size, "%10i", (int)_rRecord.SequenceNumber );
- if ( used >= buffer_size )
- buffer[ buffer_size ] = 0;
+ const int buffer_size = sizeof( buffer );
+ int used = snprintf( buffer, buffer_size, "%10i", (int)_rRecord.SequenceNumber );
+ if ( used >= buffer_size || used < 0 )
+ buffer[ buffer_size - 1 ] = 0;
::rtl::OUStringBuffer aLogEntry;
aLogEntry.appendAscii( buffer );
diff --git a/extensions/source/scanner/sane.cxx b/extensions/source/scanner/sane.cxx
index 7e0cc5e44eac..a20a915a6cc3 100644
--- a/extensions/source/scanner/sane.cxx
+++ b/extensions/source/scanner/sane.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: sane.cxx,v $
- * $Revision: 1.17 $
+ * $Revision: 1.16.60.2 $
*
* This file is part of OpenOffice.org.
*
@@ -118,7 +118,7 @@ SANE_Status (*Sane::p_read)( SANE_Handle, SANE_Byte*, SANE_Int,
void (*Sane::p_cancel)( SANE_Handle ) = 0;
SANE_Status (*Sane::p_set_io_mode)( SANE_Handle, SANE_Bool ) = 0;
SANE_Status (*Sane::p_get_select_fd)( SANE_Handle, SANE_Int* ) = 0;
-const SANE_String_Const (*Sane::p_strstatus)( SANE_Status ) = 0;
+SANE_String_Const (*Sane::p_strstatus)( SANE_Status ) = 0;
static BOOL bSaneSymbolLoadFailed = FALSE;
@@ -237,7 +237,7 @@ void Sane::Init()
LoadSymbol( "sane_set_io_mode" );
p_get_select_fd = (SANE_Status(*)(SANE_Handle, SANE_Int*))
LoadSymbol( "sane_get_select_fd" );
- p_strstatus = (const SANE_String_Const(*)(SANE_Status))
+ p_strstatus = (SANE_String_Const(*)(SANE_Status))
LoadSymbol( "sane_strstatus" );
if( bSaneSymbolLoadFailed )
DeInit();
@@ -248,7 +248,7 @@ void Sane::Init()
nStatus = p_get_devices( (const SANE_Device***)&ppDevices,
SANE_FALSE );
FAIL_SHUTDOWN_STATE( nStatus, "sane_get_devices", );
- for( nDevices = 0 ; ppDevices[ nDevices ]; nDevices++ );
+ for( nDevices = 0 ; ppDevices[ nDevices ]; nDevices++ ) ;
}
}
#if (OSL_DEBUG_LEVEL > 1) || defined DBG_UTIL
diff --git a/extensions/source/scanner/sane.hxx b/extensions/source/scanner/sane.hxx
index 9e3664794644..7b6ed63caee5 100644
--- a/extensions/source/scanner/sane.hxx
+++ b/extensions/source/scanner/sane.hxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: sane.hxx,v $
- * $Revision: 1.8 $
+ * $Revision: 1.8.64.1 $
*
* This file is part of OpenOffice.org.
*
@@ -97,7 +97,7 @@ private:
static void (*p_cancel)( SANE_Handle );
static SANE_Status (*p_set_io_mode)( SANE_Handle, SANE_Bool );
static SANE_Status (*p_get_select_fd)( SANE_Handle, SANE_Int* );
- static const SANE_String_Const (*p_strstatus)( SANE_Status );
+ static SANE_String_Const (*p_strstatus)( SANE_Status );
static SANE_Int nVersion;
static SANE_Device** ppDevices;