diff options
author | Oliver Bolte <obo@openoffice.org> | 2008-10-10 13:02:43 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2008-10-10 13:02:43 +0000 |
commit | aba2169bfb03658f4be056b59b29657adbb9a6c2 (patch) | |
tree | c90c38d1c6065734677f6f938adbedf4d2bb5ed5 /extensions/source | |
parent | 63e30833f94fa7e76cc799402ba43071cff5d2d0 (diff) |
CWS-TOOLING: integrate CWS cmcfixes49
Diffstat (limited to 'extensions/source')
-rw-r--r-- | extensions/source/logging/plaintextformatter.cxx | 10 | ||||
-rw-r--r-- | extensions/source/scanner/sane.cxx | 8 | ||||
-rw-r--r-- | extensions/source/scanner/sane.hxx | 4 |
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; |