summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-10-23 15:36:16 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-10-23 15:36:16 (GMT)
commit1c788e178d149302a1d9d5265bc46120de4f5a6a (patch)
tree129cd50791addd8768de40f65cb914137eb23949 /generic
parentcac264cd19efaa76a0b0ab5a961401118cc4b432 (diff)
downloadtcl-1c788e178d149302a1d9d5265bc46120de4f5a6a.zip
tcl-1c788e178d149302a1d9d5265bc46120de4f5a6a.tar.gz
tcl-1c788e178d149302a1d9d5265bc46120de4f5a6a.tar.bz2
Fix warning: /home/jboss/workspace/tcl8.7/generic/tclIO.c:9997:27: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
9997 | RemovePoint(nextPtr)[0] = '\r'; | ^
Diffstat (limited to 'generic')
-rw-r--r--generic/tclIO.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/tclIO.c b/generic/tclIO.c
index 82eb581..349e717 100644
--- a/generic/tclIO.c
+++ b/generic/tclIO.c
@@ -287,9 +287,9 @@ static int WillRead(Channel *chanPtr);
#define IsBufferOverflowing(bufPtr) ((bufPtr)->nextAdded>(bufPtr)->bufLength)
-#define InsertPoint(bufPtr) ((bufPtr)->buf + (bufPtr)->nextAdded)
+#define InsertPoint(bufPtr) (&(bufPtr)->buf[(bufPtr)->nextAdded])
-#define RemovePoint(bufPtr) ((bufPtr)->buf + (bufPtr)->nextRemoved)
+#define RemovePoint(bufPtr) (&(bufPtr)->buf[(bufPtr)->nextRemoved])
/*
* For working with channel state flag bits.