diff options
| author | Doug Kwan <dougkwan@google.com> | 2011-06-28 20:53:07 -0700 |
|---|---|---|
| committer | Doug Kwan <dougkwan@google.com> | 2011-06-29 17:18:33 -0700 |
| commit | db7d27bf88146ed20d2c8f3c424c998dae3b9971 (patch) | |
| tree | 9c0a77f68a3110145daae793a66cb418c5415274 /vm/compiler | |
| parent | 4676d0d83c717e179ae5bd4b1b013d71bfb1101d (diff) | |
| download | android_dalvik-db7d27bf88146ed20d2c8f3c424c998dae3b9971.tar.gz android_dalvik-db7d27bf88146ed20d2c8f3c424c998dae3b9971.tar.bz2 android_dalvik-db7d27bf88146ed20d2c8f3c424c998dae3b9971.zip | |
Mark a variable as volatile to suppress a gcc warning.
Change-Id: Ic5263e2d7e52c72d35bf706d86bba2ad6548ce58
Diffstat (limited to 'vm/compiler')
| -rw-r--r-- | vm/compiler/Compiler.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/vm/compiler/Compiler.cpp b/vm/compiler/Compiler.cpp index 77cf164c6..c08d42dfb 100644 --- a/vm/compiler/Compiler.cpp +++ b/vm/compiler/Compiler.cpp @@ -649,7 +649,12 @@ static void *compilerThreadStart(void *arg) CompilerWorkOrder work = workDequeue(); dvmUnlockMutex(&gDvmJit.compilerLock); #if defined(WITH_JIT_TUNING) - u8 startTime = dvmGetRelativeTimeUsec(); + /* + * This is live across setjmp(). Mark it volatile to suppress + * a gcc warning. We should not need this since it is assigned + * only once but gcc is not smart enough. + */ + volatile u8 startTime = dvmGetRelativeTimeUsec(); #endif /* * Check whether there is a suspend request on me. This |
