Eclair complains of a side effect in a sizeof() expression (R13.6). write_atomic() only evaluates each parameter once, but rewrite the expression to less resemble entries in an obfuscation contest.
No functional change. Signed-off-by: Andrew Cooper <[email protected]> --- CC: Jan Beulich <[email protected]> CC: Roger Pau Monné <[email protected]> CC: Stefano Stabellini <[email protected]> CC: Julien Grall <[email protected]> CC: Volodymyr Babchuk <[email protected]> CC: Bertrand Marquis <[email protected]> CC: Michal Orzel <[email protected]> CC: [email protected] <[email protected]> CC: Nicola Vetrini <[email protected]> --- xen/arch/x86/mm/shadow/set.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/mm/shadow/set.c b/xen/arch/x86/mm/shadow/set.c index 8b670b6bb555..96ba2811077e 100644 --- a/xen/arch/x86/mm/shadow/set.c +++ b/xen/arch/x86/mm/shadow/set.c @@ -62,8 +62,8 @@ shadow_write_entries(void *d, const void *s, unsigned int entries, mfn_t mfn) ASSERT(IS_ALIGNED((unsigned long)dst, sizeof(*dst))); - for ( ; i < entries; i++ ) - write_atomic(&dst++->l1, src++->l1); + for ( ; i < entries; i++, dst++, src++ ) + write_atomic(&dst->l1, src->l1); unmap_domain_page(map); } -- 2.39.5
