Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a1ff475b authored by Chih-Hung Hsieh's avatar Chih-Hung Hsieh
Browse files

Add volatile to avoid clang optimization.

BUG: 18108178
Change-Id: Ie5b8b1808fcf6d1eacc14a7c6ac0c8d49641fec2
parent 5bea7edd
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -59,7 +59,7 @@ static void *noisy(void *x)
    for(;;) {
        usleep(250*1000);
        write(2, &c, 1);
        if(c == 'C') *((unsigned*) 0) = 42;
        if(c == 'C') *((volatile unsigned*) 0) = 42;
    }
    return NULL;
}