1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

tests: add another explicit barrier

Just to be sure compiler cannot optimize this out.
This commit is contained in:
Zdenek Kabelac 2024-04-16 21:13:53 +02:00
parent bb276bf250
commit 2d01af8e56

View File

@ -66,6 +66,7 @@ int main (int argc, char *argv[])
rot13(aes);
snprintf(table, sizeof(table), "%s %s 0 %s %u", cipher, aes, device, sz);
memset(aes, 0, sizeof(aes));
asm volatile ("" ::: "memory");/* Compiler barrier. */
(void) dm_task_add_target(dmt, 0, sz, "crypt", table);
memset(table, 0, sizeof(table));
asm volatile ("" ::: "memory");/* Compiler barrier. */