[Libreoffice-commits] .: 4 commits - tools/source vcl/source
Caolán McNamara
caolan at kemper.freedesktop.org
Thu Dec 16 12:18:49 PST 2010
tools/source/reversemap/bestreversemap.cxx | 7 ++-----
vcl/source/gdi/pdfwriter_impl.cxx | 7 ++-----
2 files changed, 4 insertions(+), 10 deletions(-)
New commits:
commit e66c7046a54d967764d3617bf91d087a4f12906a
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Dec 16 20:17:32 2010 +0000
C1061: workaround worthless compiler
diff --git a/tools/source/reversemap/bestreversemap.cxx b/tools/source/reversemap/bestreversemap.cxx
index 2391c69..d7924cd 100644
--- a/tools/source/reversemap/bestreversemap.cxx
+++ b/tools/source/reversemap/bestreversemap.cxx
@@ -132,10 +132,7 @@ SAL_IMPLEMENT_MAIN()
++c;
}
sal_Unicode cEnd = c;
- if (bFirstOutput)
- printf(" if (c < 0x%x)\n", c);
- else
- printf(" else if (c < 0x%x)\n", c);
+ printf(" if (c < 0x%x)\n", c);
printf(" return %s;\n", aConverters[nMostCapable].getName());
bFirstOutput = false;
while(c < 0xFFFF)
@@ -158,7 +155,7 @@ SAL_IMPLEMENT_MAIN()
{
if (c < 0xFFFF)
{
- printf(" else if (c < 0x%x)\n", c);
+ printf(" if (c < 0x%x)\n", c);
printf(" return RTL_TEXTENCODING_DONTKNOW;\n");
}
else
commit 3f7a96e2de304dd91a2811403003b8fd48301203
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Dec 16 11:45:31 2010 +0000
cppcheck: unused variable
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index b18e293..79c83c8 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -3051,7 +3051,6 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitSystemFont( const ImplFontDa
return aRet;
}
- sal_Int32 nFontObject = 0;
sal_Int32 nFontDescriptor = 0;
rtl::OString aSubType( "/Type1" );
FontSubsetInfo aInfo;
@@ -3149,7 +3148,6 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitSystemFont( const ImplFontDa
"endobj\n\n" );
writeBuffer( aLine.getStr(), aLine.getLength() );
- nFontObject = nObject;
aRet[ rEmbed.m_nNormalFontID ] = nObject;
}
}
commit a5e8a3c65e5ac3bb0bec755b875fa935e18c9555
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Dec 16 11:43:00 2010 +0000
cppcheck: init this variable
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 80c0c9b..b18e293 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -12087,7 +12087,7 @@ void PDFWriterImpl::computeEncryptionKey(sal_uInt8 *paThePaddedPassword, sal_uIn
if( nError == rtl_Digest_E_None )
nError = rtl_digest_updateMD5( m_aDigest, m_nDocID , sizeof( m_nDocID ) );
//get the digest
- sal_uInt8 nMD5Sum[ RTL_DIGEST_LENGTH_MD5 ];
+ sal_uInt8 nMD5Sum[ RTL_DIGEST_LENGTH_MD5 ] = {0};
if( nError == rtl_Digest_E_None )
{
rtl_digest_getMD5( m_aDigest, nMD5Sum, sizeof( nMD5Sum ) );
commit 6d583ed192a18cbaa15db23649ecea6a47e13fc3
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Dec 16 11:40:58 2010 +0000
cppcheck: return variable unused
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index a903fe2..80c0c9b 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -7730,7 +7730,6 @@ void PDFWriterImpl::drawText( const Rectangle& rRect, const String& rOrigStr, US
XubString aLastLine;
ImplMultiTextLineInfo aMultiLineInfo;
ImplTextLineInfo* pLineInfo;
- long nMaxTextWidth;
xub_StrLen i;
xub_StrLen nLines;
xub_StrLen nFormatLines;
@@ -7738,7 +7737,7 @@ void PDFWriterImpl::drawText( const Rectangle& rRect, const String& rOrigStr, US
if ( nTextHeight )
{
::vcl::DefaultTextLayout aLayout( *m_pReferenceDevice );
- nMaxTextWidth = OutputDevice::ImplGetTextLines( aMultiLineInfo, nWidth, aStr, nStyle, aLayout );
+ OutputDevice::ImplGetTextLines( aMultiLineInfo, nWidth, aStr, nStyle, aLayout );
nLines = (xub_StrLen)(nHeight/nTextHeight);
nFormatLines = aMultiLineInfo.Count();
if ( !nLines )
More information about the Libreoffice-commits
mailing list