summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2019-09-16 15:02:24 +0200
committerStephan Bergmann <sbergman@redhat.com>2019-09-16 15:56:27 +0200
commitb89187aad86e2be000d2f4c9c380a95bf8430c2e (patch)
tree8e930bd7d0fa79f02a4ce455c5648335b650b0de /sal
parent4007ced54d611d1397387f7329a47de5efaca32f (diff)
Simplify forced memory reads
Change-Id: I68ea0a46bcaaadb455f2f2cc6e53950e2f26a763 Reviewed-on: https://gerrit.libreoffice.org/79003 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sal')
-rw-r--r--sal/osl/unx/file.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/sal/osl/unx/file.cxx b/sal/osl/unx/file.cxx
index 39d9d16334c7..96a9cfecf2b1 100644
--- a/sal/osl/unx/file.cxx
+++ b/sal/osl/unx/file.cxx
@@ -1175,19 +1175,18 @@ oslFileError SAL_CALL osl_mapFile(
* Pagein, touching first byte of every memory page.
* Note: volatile disables optimizing the loop away.
*/
- sal_uInt8 *pData(static_cast<sal_uInt8*>(*ppAddr));
+ sal_uInt8 volatile *pData(static_cast<sal_uInt8*>(*ppAddr));
size_t nSize(nLength);
- volatile sal_uInt8 c = 0;
while (nSize > nPageSize)
{
- c = c ^ pData[0];
+ pData[0];
pData += nPageSize;
nSize -= nPageSize;
}
if (nSize > 0)
- c = c ^ pData[0];
+ pData[0];
}
}