0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-26 15:33:54 +01:00

Wrap clang diagnostics in #ifdef to prevent GCC warning.

This commit is contained in:
Jason Volk 2019-07-20 15:11:01 -07:00
parent 556d73d96e
commit b6903bf643
2 changed files with 8 additions and 0 deletions

View file

@ -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

View file

@ -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
///////////////////////////////////////////////////////////////////////////////