diff --git a/db/dbformat.h b/db/dbformat.h index 64a0fbc6987..5f29409c864 100644 --- a/db/dbformat.h +++ b/db/dbformat.h @@ -495,15 +495,15 @@ class IterKey { buf_ = p; buf_size_ = total_size; } - #if defined(__GNUC__) - #pragma GCC diagnostic push - #pragma GCC diagnostic ignored "-Warray-bounds" - #pragma GCC diagnostic ignored "-Wstringop-overflow" - #endif +#if defined(__GNUC__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Warray-bounds" +#pragma GCC diagnostic ignored "-Wstringop-overflow" +#endif memcpy(buf() + shared_len, non_shared_data, non_shared_len); - #if defined(__GNUC__) - #pragma GCC diagnostic pop - #endif +#if defined(__GNUC__) +#pragma GCC diagnostic pop +#endif key_ = buf(); key_size_ = total_size; }