summaryrefslogtreecommitdiff
path: root/package/source
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2006-06-20 05:10:31 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2006-06-20 05:10:31 +0000
commit61909d4a5e9647d3c5bcf53e609660e3a40c5984 (patch)
tree27e9f3513f063fcb3f1fdd90c697c6052e5874f4 /package/source
parentf0d2e87057f6d6f0e51e31b59c246cf6d99ad185 (diff)
INTEGRATION: CWS warnings01 (1.3.4); FILE MERGED
2006/02/21 10:39:24 cd 1.3.4.3: #i55991# Warning free code for Windows C++ compiler 2005/11/02 08:40:57 cd 1.3.4.2: #i53898# Warning free code non product gcc 2005/11/01 17:10:16 cd 1.3.4.1: #i53898# Warning free code for sun sparc compiler
Diffstat (limited to 'package/source')
-rw-r--r--package/source/manifest/Base64Codec.cxx27
1 files changed, 12 insertions, 15 deletions
diff --git a/package/source/manifest/Base64Codec.cxx b/package/source/manifest/Base64Codec.cxx
index 03d42e41159d..9a286181cf37 100644
--- a/package/source/manifest/Base64Codec.cxx
+++ b/package/source/manifest/Base64Codec.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: Base64Codec.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: rt $ $Date: 2005-09-08 16:01:50 $
+ * last change: $Author: hr $ $Date: 2006-06-20 06:10:31 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -124,20 +124,20 @@ void ThreeByteToFourByte (const sal_uInt8* pBuffer, const sal_Int32 nStart, cons
sBuffer.appendAscii("====");
- sal_uInt8 nIndex ((nBinaer & 0xFC0000) >> 18);
+ sal_uInt8 nIndex = static_cast< sal_uInt8 >((nBinaer & 0xFC0000) >> 18);
sBuffer.setCharAt(0, aBase64EncodeTable [nIndex]);
- nIndex = (nBinaer & 0x3F000) >> 12;
+ nIndex = static_cast< sal_uInt8 >((nBinaer & 0x3F000) >> 12);
sBuffer.setCharAt(1, aBase64EncodeTable [nIndex]);
if (nLen == 1)
return;
- nIndex = (nBinaer & 0xFC0) >> 6;
+ nIndex = static_cast< sal_uInt8 >((nBinaer & 0xFC0) >> 6);
sBuffer.setCharAt(2, aBase64EncodeTable [nIndex]);
if (nLen == 2)
return;
- nIndex = (nBinaer & 0x3F);
+ nIndex = static_cast< sal_uInt8 >(nBinaer & 0x3F);
sBuffer.setCharAt(3, aBase64EncodeTable [nIndex]);
}
@@ -163,12 +163,9 @@ void FourByteToThreeByte (sal_uInt8* pBuffer, sal_Int32& nLength, const sal_Int3
nLength = 0;
sal_Int32 nLen (sString.getLength());
+ OSL_ASSERT( nLen == 4 );
if (nLen != 4)
- {
- OSL_DEBUG_ONLY( "wrong length");
return;
- }
-
if (sString.indexOf(s2equal) == 2)
nLength = 1;
@@ -182,20 +179,20 @@ void FourByteToThreeByte (sal_uInt8* pBuffer, sal_Int32& nLength, const sal_Int3
(aBase64DecodeTable [sString [2]] << 6) +
(aBase64DecodeTable [sString [3]]));
- sal_uInt8 OneByte ((nBinaer & 0xFF0000) >> 16);
+ sal_uInt8 OneByte = static_cast< sal_uInt8 >((nBinaer & 0xFF0000) >> 16);
pBuffer[nStart + 0] = (sal_uInt8)OneByte;
if (nLength == 1)
return;
- OneByte = (nBinaer & 0xFF00) >> 8;
- pBuffer[nStart + 1] = (sal_uInt8)OneByte;
+ OneByte = static_cast< sal_uInt8 >((nBinaer & 0xFF00) >> 8);
+ pBuffer[nStart + 1] = OneByte;
if (nLength == 2)
return;
- OneByte = nBinaer & 0xFF;
- pBuffer[nStart + 2] = (sal_uInt8)OneByte;
+ OneByte = static_cast< sal_uInt8 >(nBinaer & 0xFF);
+ pBuffer[nStart + 2] = OneByte;
}
void Base64Codec::decodeBase64(uno::Sequence< sal_uInt8 >& aBuffer, const rtl::OUString& sBuffer)