aboutsummaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
Diffstat (limited to 'src/client')
-rw-r--r--src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc b/src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc
index 388a6580..e91e9767 100644
--- a/src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc
+++ b/src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc
@@ -48,10 +48,10 @@
#endif
void *thread_function(void *data) {
- pid_t thread_id = syscall(SYS_gettid);
- register pid_t *thread_id_ptr asm(TID_PTR_REGISTER) = &thread_id;
+ volatile pid_t thread_id = syscall(SYS_gettid);
+ register volatile pid_t *thread_id_ptr asm(TID_PTR_REGISTER) = &thread_id;
while (true)
- asm("" : : "r" (thread_id_ptr));
+ asm volatile ("" : : "r" (thread_id_ptr));
return NULL;
}