Fix merge error of diagnostic pragmas.
This commit is contained in:
parent
03600a11a4
commit
7e0794aef8
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue