-Werror,-Wdeprecated-volatile (clang-cl)
same as b89187aad8 "Simplify forced memory reads"
in sal/osl/unx/file.cxx
Change-Id: I31edbc72f88895e148609498d367a50e38723b11
Reviewed-on: https://gerrit.libreoffice.org/81408
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
This commit is contained in:
@@ -777,19 +777,18 @@ oslFileError SAL_CALL osl_mapFile(
|
||||
* Pagein, touching first byte of each memory page.
|
||||
* Note: volatile disables optimizing the loop away.
|
||||
*/
|
||||
BYTE * pData(static_cast<BYTE*>(*ppAddr));
|
||||
BYTE volatile * pData(static_cast<BYTE*>(*ppAddr));
|
||||
SIZE_T nSize(nLength);
|
||||
|
||||
volatile BYTE c = 0;
|
||||
while (nSize > dwPageSize)
|
||||
{
|
||||
c ^= pData[0];
|
||||
pData[0];
|
||||
pData += dwPageSize;
|
||||
nSize -= dwPageSize;
|
||||
}
|
||||
if (nSize > 0)
|
||||
{
|
||||
c ^= pData[0];
|
||||
pData[0];
|
||||
}
|
||||
}
|
||||
return osl_File_E_None;
|
||||
|
||||
Reference in New Issue
Block a user