Skip to content

Commit

Permalink
FIX: removed unnecessary GCC compiler-specific directive causing a wa…
Browse files Browse the repository at this point in the history
…rning when used CLANG
  • Loading branch information
Oldes committed Apr 16, 2024
1 parent b3b9824 commit 0de1752
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/os/posix/host-readline.c
Original file line number Diff line number Diff line change
Expand Up @@ -731,14 +731,11 @@ static struct termios Term_Attrs; // Initial settings, restored on exit

// If we have leftovers:
if (term->residue[0]) {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstringop-overflow"
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.
Expand Down

0 comments on commit 0de1752

Please sign in to comment.