From ef2260f4332c041530788f8fe8c4404f260a054d Mon Sep 17 00:00:00 2001 From: Dirk Zimoch Date: Mon, 10 Nov 2025 17:15:11 +0100 Subject: [PATCH] gcc < 5 does not know #pragma GCC diagnostic push But it also does not know warning -Wformat-security. --- modules/database/src/std/rec/printfRecord.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/database/src/std/rec/printfRecord.c b/modules/database/src/std/rec/printfRecord.c index 72589b2e3..64cf7b291 100644 --- a/modules/database/src/std/rec/printfRecord.c +++ b/modules/database/src/std/rec/printfRecord.c @@ -57,7 +57,7 @@ else \ flags |= F_BADLNK -#ifdef __GNUC__ +#if __GNUC__ >= 5 || defined(__clang__) # pragma GCC diagnostic push # pragma GCC diagnostic ignored "-Wformat-security" /* Intentionally passing non-const format string to epicsSnprintf() below. @@ -322,7 +322,7 @@ static void doPrintf(printfRecord *prec) prec->len = pval - prec->val; } -#ifdef __GNUC__ +#if __GNUC__ >= 5 || defined(__clang__) # pragma GCC diagnostic pop #endif