diff --git a/monitoring/perf_context_imp.h b/monitoring/perf_context_imp.h index 159e46363..90774e826 100644 --- a/monitoring/perf_context_imp.h +++ b/monitoring/perf_context_imp.h @@ -43,7 +43,7 @@ extern __thread PerfContext perf_context; #define PERF_CONDITIONAL_TIMER_FOR_MUTEX_GUARD(metric, condition) \ PerfStepTimer perf_step_timer_##metric(&(perf_context.metric), true); \ - if ((condition)) { \ + if (condition) { \ perf_step_timer_##metric.Start(); \ } diff --git a/tools/db_stress.cc b/tools/db_stress.cc index f24764b69..d7d3405ea 100644 --- a/tools/db_stress.cc +++ b/tools/db_stress.cc @@ -28,7 +28,10 @@ int main() { } #else +#ifndef __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS +#endif // __STDC_FORMAT_MACROS + #include #include #include diff --git a/tools/write_stress.cc b/tools/write_stress.cc index c010f5edf..ddb1d0aed 100644 --- a/tools/write_stress.cc +++ b/tools/write_stress.cc @@ -56,7 +56,10 @@ int main() { } #else +#ifndef __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS +#endif // __STDC_FORMAT_MACROS + #include #include #include diff --git a/util/crc32c.cc b/util/crc32c.cc index 3c56ad7c1..745ce254b 100644 --- a/util/crc32c.cc +++ b/util/crc32c.cc @@ -39,8 +39,10 @@ namespace rocksdb { namespace crc32c { +#if defined(HAVE_POWER8) && defined(HAS_ALTIVEC) #ifdef __powerpc64__ static int arch_ppc_crc32 = 0; +#endif /* __powerpc64__ */ #endif static const uint32_t table0_[256] = {