From e3bca5d865c831d3a6426b05bffd8c8d31e69886 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Fri, 14 Jul 2017 00:59:19 +0200 Subject: Fixed warnings from recent versions of GCC. Fixed incorrect buffering due to a change in the way the buf.dbuf array is compiled in at least GCC 4.9.2, GCC 5.4.0 and GCC 6.3.0. --- utils/8l/l.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'utils/8l/l.h') diff --git a/utils/8l/l.h b/utils/8l/l.h index da151014..ca3059e9 100644 --- a/utils/8l/l.h +++ b/utils/8l/l.h @@ -195,7 +195,7 @@ EXTERN union uchar obuf[MAXIO]; /* output buffer */ uchar ibuf[MAXIO]; /* input buffer */ } u; - char dbuf[1]; + char dbuf[MAXIO]; } buf; #define cbuf u.obuf -- cgit v1.2.3 From 9daa5b837e2e1f494a95ecd298d5e428ccb76b01 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Sat, 15 Jul 2017 18:12:15 +0200 Subject: Reverted casts in asm.c, changing types in l.h to compensate. Increased the size of the dbuf array to match the total size of obuf and ibuf. --- utils/8l/asm.c | 20 ++++++++++---------- utils/8l/l.h | 12 ++++++------ 2 files changed, 16 insertions(+), 16 deletions(-) (limited to 'utils/8l/l.h') diff --git a/utils/8l/asm.c b/utils/8l/asm.c index de75499f..6d09ae7c 100644 --- a/utils/8l/asm.c +++ b/utils/8l/asm.c @@ -408,11 +408,11 @@ datblk(long s, long n) if(debug['a'] && i == 0) { Bprint(&bso, pcstr, l+s+INITDAT); for(j=0; j