diff --git a/ircd/assert.cc b/ircd/assert.cc index 079d3f9e2..0d21ccfc4 100644 --- a/ircd/assert.cc +++ b/ircd/assert.cc @@ -34,8 +34,10 @@ __assert_perror_fail(int __errnum, #endif #if !defined(NDEBUG) && defined(RB_ASSERT) +#ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wunreachable-code" +#endif __clang__ void __assert_fail(const char *__assertion, const char *__file, @@ -91,7 +93,9 @@ __assert_fail(const char *__assertion, else __builtin_trap(); } +#ifdef __clang__ #pragma clang diagnostic pop +#endif __clang__ #endif void diff --git a/ircd/db.cc b/ircd/db.cc index b99cb3cc7..cb5525594 100644 --- a/ircd/db.cc +++ b/ircd/db.cc @@ -2189,8 +2189,10 @@ noexcept #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wsuggest-attribute=format" +#ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wformat-nonliteral" +#endif __clang__ void ircd::db::database::logger::Logv(const rocksdb::InfoLogLevel level_, const char *const fmt, @@ -2225,7 +2227,9 @@ noexcept rog(level, "'%s': %s", d->name, str); } +#ifdef __clang__ #pragma clang diagnostic pop +#endif __clang__ #pragma GCC diagnostic pop ///////////////////////////////////////////////////////////////////////////////