[compiler-rt] r187797 - [libsanitizer] Drive-by fix for -Wempty-body in sanitizer_common_syscalls.inc

Alexander Potapenko glider at google.com
Tue Aug 6 07:07:46 PDT 2013


Author: glider
Date: Tue Aug  6 09:07:46 2013
New Revision: 187797

URL: http://llvm.org/viewvc/llvm-project?rev=187797&view=rev
Log:
[libsanitizer] Drive-by fix for -Wempty-body in sanitizer_common_syscalls.inc
This makes the file consistently use { } around the if statements containing the PRE_/POST_ macros.

Modified:
    compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_syscalls.inc

Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_syscalls.inc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_syscalls.inc?rev=187797&r1=187796&r2=187797&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_syscalls.inc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_syscalls.inc Tue Aug  6 09:07:46 2013
@@ -145,29 +145,41 @@ POST_SYSCALL(waitpid)(long res, int pid,
 }
 
 PRE_SYSCALL(clock_gettime)(int clk_id, struct sanitizer_kernel_timespec *tp) {
-  if (tp) PRE_WRITE(tp, sizeof(*tp));
+  if (tp) {
+    PRE_WRITE(tp, sizeof(*tp));
+  }
 }
 
 POST_SYSCALL(clock_gettime)(long res, int clk_id,
                             struct sanitizer_kernel_timespec *tp) {
-  if (res == 0 && tp) POST_WRITE(tp, sizeof(*tp));
+  if (res == 0 && tp) {
+    POST_WRITE(tp, sizeof(*tp));
+  }
 }
 
 PRE_SYSCALL(clock_getres)(int clk_id, struct sanitizer_kernel_timespec *tp) {
-  if (tp) PRE_WRITE(tp, sizeof(*tp));
+  if (tp) {
+    PRE_WRITE(tp, sizeof(*tp));
+  }
 }
 
 POST_SYSCALL(clock_getres)(long res, int clk_id,
                            struct sanitizer_kernel_timespec *tp) {
-  if (res == 0 && tp) POST_WRITE(tp, sizeof(*tp));
+  if (res == 0 && tp) {
+    POST_WRITE(tp, sizeof(*tp));
+  }
 }
 
 PRE_SYSCALL(read)(unsigned int fd, void *buf, uptr count) {
-  if (buf) PRE_WRITE(buf, count);
+  if (buf) {
+    PRE_WRITE(buf, count);
+  }
 }
 
 POST_SYSCALL(read)(long res, unsigned int fd, void *buf, uptr count) {
-  if (res > 0 && buf) POST_WRITE(buf, res);
+  if (res > 0 && buf) {
+    POST_WRITE(buf, res);
+  }
 }
 }  // extern "C"
 





More information about the llvm-commits mailing list