test-rm_fault: fix build error with -std=gnu++20

Fixes #4891
This commit is contained in:
Christian Prochaska 2023-05-16 12:53:36 +02:00 committed by Christian Helmuth
parent 49f835db86
commit 0285e5f217

View File

@ -63,7 +63,9 @@ bool modify_at(addr_t addr)
return false;
if (value != READ_TEST + 1) {
addr_t value_mod = ++(*(addr_t volatile *)(addr));
(*(addr_t volatile *)(addr)) = (*(addr_t volatile *)(addr)) + 1;
addr_t value_mod = (*(addr_t volatile *)(addr));
/* if we are get told to stop, do so */
if (*(addr_t volatile *)(addr + sizeof(addr)) == STOP_TEST)