daemon: Suppress valgrind warnings from read_pidfile().
[openvswitch] / lib / backtrace.c
index 282f6b86828b0ba79b393730b5d856ce37e13847..91549db347812b516e2eb4fb27b93c54349deb62 100644 (file)
@@ -83,6 +83,7 @@ in_stack(void *p)
 void
 backtrace_capture(struct backtrace *backtrace)
 {
+#ifdef __GNUC__
     void **frame;
     size_t n;
 
@@ -95,4 +96,7 @@ backtrace_capture(struct backtrace *backtrace)
         backtrace->frames[n++] = (uintptr_t) frame[1];
     }
     backtrace->n_frames = n;
+#else
+    backtrace->n_frames = 0;
+#endif
 }