summaryrefslogtreecommitdiff
path: root/store
diff options
context:
space:
mode:
authorMatteo Casalin <matteo.casalin@yahoo.com>2015-08-29 11:05:52 +0200
committerMatteo Casalin <matteo.casalin@yahoo.com>2015-08-29 16:57:05 +0200
commit0871b509d24e0d30d2e0a4f4f38d6196def64ad1 (patch)
tree8cdd80e4860707b2a88b84d84d03c79dd80e1cb6 /store
parent4fbda7634b813e521f4bd85d042b18f92bc03706 (diff)
Avoid explicit casts of (sizeof) constants known at compile time
Partially revert my previous commit eb4cbea657b9038c488f1b1bcf5107cc226a6681 "Silence some conversion warnings", since no warning was really raised for these obvious conversions. Change-Id: Ie035655cdc56ceeb12a6141b168f7e9a8b863fee
Diffstat (limited to 'store')
-rw-r--r--store/source/storbase.hxx4
-rw-r--r--store/source/storbios.cxx4
-rw-r--r--store/source/stordata.hxx8
3 files changed, 8 insertions, 8 deletions
diff --git a/store/source/storbase.hxx b/store/source/storbase.hxx
index 78a51a1c53d1..73f2f7702464 100644
--- a/store/source/storbase.hxx
+++ b/store/source/storbase.hxx
@@ -512,7 +512,7 @@ struct PageData
void guard (sal_uInt32 nAddr)
{
sal_uInt32 nCRC32 = 0;
- nCRC32 = rtl_crc32 (nCRC32, &m_aGuard.m_nMagic, static_cast<sal_uInt32>(sizeof(sal_uInt32)));
+ nCRC32 = rtl_crc32 (nCRC32, &m_aGuard.m_nMagic, sizeof(sal_uInt32));
m_aDescr.m_nAddr = store::htonl(nAddr);
nCRC32 = rtl_crc32 (nCRC32, &m_aDescr, static_cast<sal_uInt32>(theSize - sizeof(G)));
m_aGuard.m_nCRC32 = store::htonl(nCRC32);
@@ -523,7 +523,7 @@ struct PageData
storeError verify (sal_uInt32 nAddr) const
{
sal_uInt32 nCRC32 = 0;
- nCRC32 = rtl_crc32 (nCRC32, &m_aGuard.m_nMagic, static_cast<sal_uInt32>(sizeof(sal_uInt32)));
+ nCRC32 = rtl_crc32 (nCRC32, &m_aGuard.m_nMagic, sizeof(sal_uInt32));
nCRC32 = rtl_crc32 (nCRC32, &m_aDescr, static_cast<sal_uInt32>(theSize - sizeof(G)));
if (m_aGuard.m_nCRC32 != store::htonl(nCRC32))
return store_E_InvalidChecksum;
diff --git a/store/source/storbios.cxx b/store/source/storbios.cxx
index 0b06795668a8..f378894d7746 100644
--- a/store/source/storbios.cxx
+++ b/store/source/storbios.cxx
@@ -120,7 +120,7 @@ struct OStoreSuperBlock
void guard()
{
sal_uInt32 nCRC32 = 0;
- nCRC32 = rtl_crc32 (nCRC32, &m_aGuard.m_nMagic, static_cast<sal_uInt32>(sizeof(sal_uInt32)));
+ nCRC32 = rtl_crc32 (nCRC32, &m_aGuard.m_nMagic, sizeof(sal_uInt32));
nCRC32 = rtl_crc32 (nCRC32, &m_aDescr, static_cast<sal_uInt32>(theSize - sizeof(G)));
m_aGuard.m_nCRC32 = store::htonl(nCRC32);
}
@@ -134,7 +134,7 @@ struct OStoreSuperBlock
return store_E_WrongFormat;
sal_uInt32 nCRC32 = 0;
- nCRC32 = rtl_crc32 (nCRC32, &m_aGuard.m_nMagic, static_cast<sal_uInt32>(sizeof(sal_uInt32)));
+ nCRC32 = rtl_crc32 (nCRC32, &m_aGuard.m_nMagic, sizeof(sal_uInt32));
nCRC32 = rtl_crc32 (nCRC32, &m_aDescr, static_cast<sal_uInt32>(theSize - sizeof(G)));
if (m_aGuard.m_nCRC32 != store::htonl(nCRC32))
return store_E_InvalidChecksum;
diff --git a/store/source/stordata.hxx b/store/source/stordata.hxx
index 17de3c35f25e..e53a9b6c401b 100644
--- a/store/source/stordata.hxx
+++ b/store/source/stordata.hxx
@@ -320,7 +320,7 @@ struct OStorePageNameBlock
void guard()
{
sal_uInt32 nCRC32 = 0;
- nCRC32 = rtl_crc32 (nCRC32, &m_aGuard.m_nMagic, static_cast<sal_uInt32>(sizeof(sal_uInt32)));
+ nCRC32 = rtl_crc32 (nCRC32, &m_aGuard.m_nMagic, sizeof(sal_uInt32));
nCRC32 = rtl_crc32 (nCRC32, &m_aKey, static_cast<sal_uInt32>(theSize - sizeof(G)));
m_aGuard.m_nCRC32 = store::htonl(nCRC32);
}
@@ -330,7 +330,7 @@ struct OStorePageNameBlock
storeError verify() const
{
sal_uInt32 nCRC32 = 0;
- nCRC32 = rtl_crc32 (nCRC32, &m_aGuard.m_nMagic, static_cast<sal_uInt32>(sizeof(sal_uInt32)));
+ nCRC32 = rtl_crc32 (nCRC32, &m_aGuard.m_nMagic, sizeof(sal_uInt32));
nCRC32 = rtl_crc32 (nCRC32, &m_aKey, static_cast<sal_uInt32>(theSize - sizeof(G)));
if (m_aGuard.m_nCRC32 != store::htonl(nCRC32))
return store_E_InvalidChecksum;
@@ -424,7 +424,7 @@ struct OStoreDirectoryDataBlock
void guard()
{
sal_uInt32 nCRC32 = 0;
- nCRC32 = rtl_crc32 (nCRC32, &m_aGuard.m_nMagic, static_cast<sal_uInt32>(sizeof(sal_uInt32)));
+ nCRC32 = rtl_crc32 (nCRC32, &m_aGuard.m_nMagic, sizeof(sal_uInt32));
nCRC32 = rtl_crc32 (nCRC32, &m_aTable, static_cast<sal_uInt32>(theSize - sizeof(G)));
m_aGuard.m_nCRC32 = store::htonl(nCRC32);
}
@@ -434,7 +434,7 @@ struct OStoreDirectoryDataBlock
storeError verify() const
{
sal_uInt32 nCRC32 = 0;
- nCRC32 = rtl_crc32 (nCRC32, &m_aGuard.m_nMagic, static_cast<sal_uInt32>(sizeof(sal_uInt32)));
+ nCRC32 = rtl_crc32 (nCRC32, &m_aGuard.m_nMagic, sizeof(sal_uInt32));
nCRC32 = rtl_crc32 (nCRC32, &m_aTable, static_cast<sal_uInt32>(theSize - sizeof(G)));
if (m_aGuard.m_nCRC32 != store::htonl(nCRC32))
return store_E_InvalidChecksum;