mirror of
https://github.com/tmux/tmux.git
synced 2026-02-15 02:29:19 +00:00
Stick the pragmas outside the function (make GCC 4 happier) and under __GNUC__.
This commit is contained in:
10
format.c
10
format.c
@@ -455,14 +455,18 @@ format_job_tidy(struct format_job_tree *jobs, int force)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Work around needless -Wformat-nonliteral gcc warning. */
|
/* Work around needless -Wformat-nonliteral gcc warning. */
|
||||||
|
#ifdef __GNUC__
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wformat-nonliteral"
|
||||||
|
#endif
|
||||||
static size_t
|
static size_t
|
||||||
format_strftime(char *s, size_t max, const char *fmt, const struct tm *tm)
|
format_strftime(char *s, size_t max, const char *fmt, const struct tm *tm)
|
||||||
{
|
{
|
||||||
#pragma GCC diagnostic push
|
|
||||||
#pragma GCC diagnostic ignored "-Wformat-nonliteral"
|
|
||||||
return (strftime(s, max, fmt, tm));
|
return (strftime(s, max, fmt, tm));
|
||||||
#pragma GCC diagnostic pop
|
|
||||||
}
|
}
|
||||||
|
#ifdef __GNUC__
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Tidy old jobs for all clients. */
|
/* Tidy old jobs for all clients. */
|
||||||
void
|
void
|
||||||
|
|||||||
Reference in New Issue
Block a user