Fix merge error of diagnostic pragmas.

This commit is contained in:
joerg 2016-01-16 01:14:21 +00:00
parent 03600a11a4
commit 7e0794aef8
1 changed files with 9 additions and 3 deletions

View File

@ -93,9 +93,6 @@ log_vwrite(const char *msg, va_list ap)
free(out);
free(fmt);
}
#if __GNUC_PREREQ__(4, 6) || defined(__clang__)
#pragma GCC diagnostic push
#endif
/* Log a debug message. */
void
@ -108,6 +105,11 @@ log_debug(const char *msg, ...)
va_end(ap);
}
#if __GNUC_PREREQ__(4, 6) || defined(__clang__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat-nonliteral"
#endif
/* Log a critical error with error string and die. */
__dead void
log_fatal(const char *msg, ...)
@ -135,3 +137,7 @@ log_fatalx(const char *msg, ...)
log_vwrite(fmt, ap);
exit(1);
}
#if __GNUC_PREREQ__(4, 6) || defined(__clang__)
#pragma GCC diagnostic pop
#endif