You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
libreoffice/0001-wrong-types-used-here-...

44 lines
1.4 KiB

From 78719066cb546c7dc74e87488b9b7a695606cf7c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Tue, 6 Mar 2012 09:37:35 +0000
Subject: [PATCH] wrong types used here, breaks 64bit bigendian
---
sw/qa/core/Test-BigPtrArray.cxx | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/sw/qa/core/Test-BigPtrArray.cxx b/sw/qa/core/Test-BigPtrArray.cxx
index 7953dc3..d9be7a2 100644
--- a/sw/qa/core/Test-BigPtrArray.cxx
+++ b/sw/qa/core/Test-BigPtrArray.cxx
@@ -82,7 +82,7 @@ namespace /* private */
sal_Bool AddToCount(const ElementPtr& rElem, void* pArgs)
{
BigPtrEntryMock* const pbem = static_cast<BigPtrEntryMock* const>(rElem);
- pbem->setCount(pbem->getCount() + *((int*)pArgs));
+ pbem->setCount(pbem->getCount() + *((sal_uLong*)pArgs));
return true;
}
@@ -655,7 +655,7 @@ public:
fillBigPtrArray(bparr, NUM_ENTRIES);
dumpBigPtrArray(bparr);
- int addCount = 1;
+ sal_uLong addCount = 1;
bparr.ForEach(AddToCount, &addCount);
for (sal_uLong i = 0; i < NUM_ENTRIES; i++)
@@ -715,7 +715,7 @@ public:
fillBigPtrArray(bparr, NUM_ENTRIES);
dumpBigPtrArray(bparr);
- int addCount = 1;
+ sal_uLong addCount = 1;
bparr.ForEach(NUM_ENTRIES / 2, NUM_ENTRIES, AddToCount, &addCount);
sal_uLong i = 0;
--
1.7.7.6