diff options
author | Chih-Hung Hsieh <chh@google.com> | 2014-10-23 16:50:51 -0700 |
---|---|---|
committer | Chih-Hung Hsieh <chh@google.com> | 2014-10-23 16:50:51 -0700 |
commit | a1ff475b07dd7c8a2dfa0e83bc2a25ef159b6152 (patch) | |
tree | 9ebb0e3dae4c6942627d7e5a2b1fcc7071a156a4 | |
parent | 5bea7edddd1bca0f94b08f3fb7aefab1c3021e17 (diff) | |
download | system_core-a1ff475b07dd7c8a2dfa0e83bc2a25ef159b6152.zip system_core-a1ff475b07dd7c8a2dfa0e83bc2a25ef159b6152.tar.gz system_core-a1ff475b07dd7c8a2dfa0e83bc2a25ef159b6152.tar.bz2 |
Add volatile to avoid clang optimization.
BUG: 18108178
Change-Id: Ie5b8b1808fcf6d1eacc14a7c6ac0c8d49641fec2
-rw-r--r-- | debuggerd/crasher.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/debuggerd/crasher.c b/debuggerd/crasher.c index d315ee5..d0c3912 100644 --- a/debuggerd/crasher.c +++ b/debuggerd/crasher.c @@ -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; } |