From 58c96992a8c190bc967caa2e7c7e382800d5827d Mon Sep 17 00:00:00 2001 From: Oldes Huhuman Date: Tue, 16 Apr 2024 23:11:08 +0200 Subject: [PATCH] FIX: reverted GCC compiler-specific directive but used only with GCC --- src/os/posix/host-readline.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/os/posix/host-readline.c b/src/os/posix/host-readline.c index 0ad096f44e..b7fc71332f 100644 --- a/src/os/posix/host-readline.c +++ b/src/os/posix/host-readline.c @@ -731,11 +731,16 @@ static struct termios Term_Attrs; // Initial settings, restored on exit // If we have leftovers: if (term->residue[0]) { +#pragma GCC diagnostic push +#ifdef __GNUC__ +#pragma GCC diagnostic ignored "-Wstringop-overflow" +#endif end = (int)LEN_BYTES(term->residue); if (end < len) len = end; COPY_STR(buf, term->residue, len); // terminated below COPY_MEM(term->residue, term->residue+len, end-len); // remove term->residue[end-len] = 0; +#pragma GCC diagnostic pop } else { // Read next few bytes. We don't know how many may be waiting.