From b2a13122c0594bac47c5aa293d99ea6a2c440b06 Mon Sep 17 00:00:00 2001 From: martynas Date: Sat, 28 Dec 2013 03:19:02 +0000 Subject: [PATCH] - adjust getcwd-1.c.exp.gcc{3,4} after the getwd linker warning got added - adjust gcc-builtins to use the same approach as gcc-bounds - enable gcc-bounds and gcc-builtins in the default regression suite now that everything passes --- regress/gnu/egcs/Makefile | 9 ++------- regress/gnu/egcs/gcc-bounds/Makefile | 10 +++++----- regress/gnu/egcs/gcc-bounds/getcwd-1.c.exp.gcc3 | 1 + regress/gnu/egcs/gcc-bounds/getcwd-1.c.exp.gcc4 | 1 + regress/gnu/egcs/gcc-builtins/Makefile | 6 +++--- regress/gnu/egcs/gcc-builtins/sprintf-1.c.exp | 3 +-- regress/gnu/egcs/gcc-builtins/sprintf-2.c.exp | 3 +-- regress/gnu/egcs/gcc-builtins/sprintf-3.c.exp | 3 +-- regress/gnu/egcs/gcc-builtins/stpcpy-1.c.exp | 3 +-- regress/gnu/egcs/gcc-builtins/stpcpy-2.c.exp | 3 +-- regress/gnu/egcs/gcc-builtins/strcat-1.c.exp | 3 +-- regress/gnu/egcs/gcc-builtins/strcat-2.c.exp | 3 +-- regress/gnu/egcs/gcc-builtins/strcpy-1.c.exp | 3 +-- regress/gnu/egcs/gcc-builtins/strcpy-2.c.exp | 3 +-- regress/gnu/egcs/gcc-builtins/vsprintf-1.c.exp | 3 +-- regress/gnu/egcs/gcc-builtins/vsprintf-2.c.exp | 3 +-- regress/gnu/egcs/gcc-builtins/vsprintf-3.c.exp | 3 +-- 17 files changed, 24 insertions(+), 39 deletions(-) diff --git a/regress/gnu/egcs/Makefile b/regress/gnu/egcs/Makefile index 962ff9d1188..068ddc5d5cb 100644 --- a/regress/gnu/egcs/Makefile +++ b/regress/gnu/egcs/Makefile @@ -1,11 +1,6 @@ -# $OpenBSD: Makefile,v 1.7 2013/12/28 02:14:32 martynas Exp $ +# $OpenBSD: Makefile,v 1.8 2013/12/28 03:19:02 martynas Exp $ -SUBDIR+= gcc libiberty - -.if defined(REGRESS_FULL) -SUBDIR += gcc-bounds -SUBDIR += gcc-builtins -.endif +SUBDIR+= gcc gcc-bounds gcc-builtins libiberty install: diff --git a/regress/gnu/egcs/gcc-bounds/Makefile b/regress/gnu/egcs/gcc-bounds/Makefile index 688843a10ad..e522743480f 100644 --- a/regress/gnu/egcs/gcc-bounds/Makefile +++ b/regress/gnu/egcs/gcc-bounds/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.13 2013/08/06 19:11:53 miod Exp $ +# $OpenBSD: Makefile,v 1.14 2013/12/28 03:19:02 martynas Exp $ C_MODULES?= strlcpy strlcat getcwd memcpy fread memcpy declare \ sscanf vararray md builtins @@ -28,7 +28,7 @@ REGRESS_TARGETS= ${C_TARGETS} ${CPP_TARGETS} . for j in ${C_${i:U}} C_TARGETS+= c-${i}-${j} c-${i}-${j}: - ${TCC} ${TCFLAGS} -o /dev/null ${i}-${j}.c 2>&1 | diff -u - ${.CURDIR}/${i}-${j}.c${EXP} + ${TCC} ${TCFLAGS} -o /dev/null ${i}-${j}.c 2>&1 | sed '/^\/tmp\//d' | diff -u - ${.CURDIR}/${i}-${j}.c${EXP} . endfor .endfor @@ -36,16 +36,16 @@ c-${i}-${j}: . for j in ${CPP_${i:U}} CPP_TARGETS+= cpp-${i}-${j} cpp-${i}-${j}: - ${TCXX} ${TCXXFLAGS} -o /dev/null ${i}-${j}.cpp 2>&1 | grep -v 'misused' | diff -u - ${.CURDIR}/${i}-${j}.cpp${EXP} + ${TCXX} ${TCXXFLAGS} -o /dev/null ${i}-${j}.cpp 2>&1 | grep -v 'misused' | sed '/^\/tmp\//d' | diff -u - ${.CURDIR}/${i}-${j}.cpp${EXP} . endfor .endfor generate: .for i in ${C_TARGETS} - -${TCC} ${TCFLAGS} -o /dev/null ${i:C/^c-//g}.c >${i:C/^c-//g}.c${EXP} 2>&1 + -${TCC} ${TCFLAGS} -o /dev/null ${i:C/^c-//g}.c 2>&1 | sed '/^\/tmp\//d' >${i:C/^c-//g}.c${EXP} .endfor .for i in ${CPP_TARGETS} - -${TCXX} ${TCXXFLAGS} -o /dev/null ${i:C/^cpp-//g}.cpp >${i:C/^cpp-//g}.cpp${EXP} 2>&1 + -${TCXX} ${TCXXFLAGS} -o /dev/null ${i:C/^cpp-//g}.cpp 2>&1 | sed '/^\/tmp\//d' >${i:C/^cpp-//g}.cpp${EXP} .endfor .PHONY: ${REGRESS_TARGETS} generate regress diff --git a/regress/gnu/egcs/gcc-bounds/getcwd-1.c.exp.gcc3 b/regress/gnu/egcs/gcc-bounds/getcwd-1.c.exp.gcc3 index fd2af53199d..4843f632ed6 100644 --- a/regress/gnu/egcs/gcc-bounds/getcwd-1.c.exp.gcc3 +++ b/regress/gnu/egcs/gcc-bounds/getcwd-1.c.exp.gcc3 @@ -1,2 +1,3 @@ getcwd-1.c: In function `main': getcwd-1.c:5: warning: array size (10) is smaller than minimum required (1024) +: warning: getwd() possibly used unsafely; consider using getcwd() diff --git a/regress/gnu/egcs/gcc-bounds/getcwd-1.c.exp.gcc4 b/regress/gnu/egcs/gcc-bounds/getcwd-1.c.exp.gcc4 index 08783a7ddc9..270a4b542c7 100644 --- a/regress/gnu/egcs/gcc-bounds/getcwd-1.c.exp.gcc4 +++ b/regress/gnu/egcs/gcc-bounds/getcwd-1.c.exp.gcc4 @@ -1,2 +1,3 @@ getcwd-1.c: In function 'main': getcwd-1.c:5: warning: array size (10) is smaller than minimum required (1024) +: warning: getwd() possibly used unsafely; consider using getcwd() diff --git a/regress/gnu/egcs/gcc-builtins/Makefile b/regress/gnu/egcs/gcc-builtins/Makefile index ecfb1d35239..97fce163ee9 100644 --- a/regress/gnu/egcs/gcc-builtins/Makefile +++ b/regress/gnu/egcs/gcc-builtins/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.1 2013/12/28 02:14:32 martynas Exp $ +# $OpenBSD: Makefile,v 1.2 2013/12/28 03:19:02 martynas Exp $ GCC_BUILTINS= sprintf-1 sprintf-2 sprintf-3 stpcpy-1 stpcpy-2 strcat-1 \ strcat-2 strcpy-1 strcpy-2 strncat-1 vsprintf-1 vsprintf-2 \ @@ -11,12 +11,12 @@ TCXXFLAGS= ${TCFLAGS} .for i in ${GCC_BUILTINS} REGRESS_TARGETS+= c-${i} c-${i}: - ${TCC} ${TCFLAGS} -o /dev/null ${i}.c 2>&1 | cut -d: -f2- | diff -u - ${.CURDIR}/${i}.c.exp + ${TCC} ${TCFLAGS} -o /dev/null ${i}.c 2>&1 | sed '/^\/tmp\//d' | diff -u - ${.CURDIR}/${i}.c.exp .endfor generate: .for i in ${REGRESS_TARGETS} - -${TCC} ${TCFLAGS} -o /dev/null ${i:C/^c-//g}.c 2>&1 | cut -d: -f2- >${i:C/^c-//g}.c.exp + -${TCC} ${TCFLAGS} -o /dev/null ${i:C/^c-//g}.c 2>&1 | sed '/^\/tmp\//d' >${i:C/^c-//g}.c.exp .endfor .PHONY: ${REGRESS_TARGETS} generate regress diff --git a/regress/gnu/egcs/gcc-builtins/sprintf-1.c.exp b/regress/gnu/egcs/gcc-builtins/sprintf-1.c.exp index 6d3879edbd3..833d1855cd3 100644 --- a/regress/gnu/egcs/gcc-builtins/sprintf-1.c.exp +++ b/regress/gnu/egcs/gcc-builtins/sprintf-1.c.exp @@ -1,2 +1 @@ - In function `main': - warning: sprintf() is often misused, please use snprintf() +: warning: sprintf() is often misused, please use snprintf() diff --git a/regress/gnu/egcs/gcc-builtins/sprintf-2.c.exp b/regress/gnu/egcs/gcc-builtins/sprintf-2.c.exp index 6d3879edbd3..833d1855cd3 100644 --- a/regress/gnu/egcs/gcc-builtins/sprintf-2.c.exp +++ b/regress/gnu/egcs/gcc-builtins/sprintf-2.c.exp @@ -1,2 +1 @@ - In function `main': - warning: sprintf() is often misused, please use snprintf() +: warning: sprintf() is often misused, please use snprintf() diff --git a/regress/gnu/egcs/gcc-builtins/sprintf-3.c.exp b/regress/gnu/egcs/gcc-builtins/sprintf-3.c.exp index 6d3879edbd3..833d1855cd3 100644 --- a/regress/gnu/egcs/gcc-builtins/sprintf-3.c.exp +++ b/regress/gnu/egcs/gcc-builtins/sprintf-3.c.exp @@ -1,2 +1 @@ - In function `main': - warning: sprintf() is often misused, please use snprintf() +: warning: sprintf() is often misused, please use snprintf() diff --git a/regress/gnu/egcs/gcc-builtins/stpcpy-1.c.exp b/regress/gnu/egcs/gcc-builtins/stpcpy-1.c.exp index ef88ade942d..0ccabf8b684 100644 --- a/regress/gnu/egcs/gcc-builtins/stpcpy-1.c.exp +++ b/regress/gnu/egcs/gcc-builtins/stpcpy-1.c.exp @@ -1,2 +1 @@ - In function `main': - warning: stpcpy() is dangerous GNU crap; don't use it +: warning: stpcpy() is dangerous GNU crap; don't use it diff --git a/regress/gnu/egcs/gcc-builtins/stpcpy-2.c.exp b/regress/gnu/egcs/gcc-builtins/stpcpy-2.c.exp index ef88ade942d..0ccabf8b684 100644 --- a/regress/gnu/egcs/gcc-builtins/stpcpy-2.c.exp +++ b/regress/gnu/egcs/gcc-builtins/stpcpy-2.c.exp @@ -1,2 +1 @@ - In function `main': - warning: stpcpy() is dangerous GNU crap; don't use it +: warning: stpcpy() is dangerous GNU crap; don't use it diff --git a/regress/gnu/egcs/gcc-builtins/strcat-1.c.exp b/regress/gnu/egcs/gcc-builtins/strcat-1.c.exp index e0fe608bca9..4e102acab4c 100644 --- a/regress/gnu/egcs/gcc-builtins/strcat-1.c.exp +++ b/regress/gnu/egcs/gcc-builtins/strcat-1.c.exp @@ -1,2 +1 @@ - In function `main': - warning: strcat() is almost always misused, please use strlcat() +: warning: strcat() is almost always misused, please use strlcat() diff --git a/regress/gnu/egcs/gcc-builtins/strcat-2.c.exp b/regress/gnu/egcs/gcc-builtins/strcat-2.c.exp index e0fe608bca9..4e102acab4c 100644 --- a/regress/gnu/egcs/gcc-builtins/strcat-2.c.exp +++ b/regress/gnu/egcs/gcc-builtins/strcat-2.c.exp @@ -1,2 +1 @@ - In function `main': - warning: strcat() is almost always misused, please use strlcat() +: warning: strcat() is almost always misused, please use strlcat() diff --git a/regress/gnu/egcs/gcc-builtins/strcpy-1.c.exp b/regress/gnu/egcs/gcc-builtins/strcpy-1.c.exp index 2528526b848..5af91ab605a 100644 --- a/regress/gnu/egcs/gcc-builtins/strcpy-1.c.exp +++ b/regress/gnu/egcs/gcc-builtins/strcpy-1.c.exp @@ -1,2 +1 @@ - In function `main': - warning: strcpy() is almost always misused, please use strlcpy() +: warning: strcpy() is almost always misused, please use strlcpy() diff --git a/regress/gnu/egcs/gcc-builtins/strcpy-2.c.exp b/regress/gnu/egcs/gcc-builtins/strcpy-2.c.exp index 2528526b848..5af91ab605a 100644 --- a/regress/gnu/egcs/gcc-builtins/strcpy-2.c.exp +++ b/regress/gnu/egcs/gcc-builtins/strcpy-2.c.exp @@ -1,2 +1 @@ - In function `main': - warning: strcpy() is almost always misused, please use strlcpy() +: warning: strcpy() is almost always misused, please use strlcpy() diff --git a/regress/gnu/egcs/gcc-builtins/vsprintf-1.c.exp b/regress/gnu/egcs/gcc-builtins/vsprintf-1.c.exp index 836db0696bc..cdac4efb0fe 100644 --- a/regress/gnu/egcs/gcc-builtins/vsprintf-1.c.exp +++ b/regress/gnu/egcs/gcc-builtins/vsprintf-1.c.exp @@ -1,2 +1 @@ - In function `test_vsprintf': - warning: vsprintf() is often misused, please use vsnprintf() +: warning: vsprintf() is often misused, please use vsnprintf() diff --git a/regress/gnu/egcs/gcc-builtins/vsprintf-2.c.exp b/regress/gnu/egcs/gcc-builtins/vsprintf-2.c.exp index 836db0696bc..cdac4efb0fe 100644 --- a/regress/gnu/egcs/gcc-builtins/vsprintf-2.c.exp +++ b/regress/gnu/egcs/gcc-builtins/vsprintf-2.c.exp @@ -1,2 +1 @@ - In function `test_vsprintf': - warning: vsprintf() is often misused, please use vsnprintf() +: warning: vsprintf() is often misused, please use vsnprintf() diff --git a/regress/gnu/egcs/gcc-builtins/vsprintf-3.c.exp b/regress/gnu/egcs/gcc-builtins/vsprintf-3.c.exp index 836db0696bc..cdac4efb0fe 100644 --- a/regress/gnu/egcs/gcc-builtins/vsprintf-3.c.exp +++ b/regress/gnu/egcs/gcc-builtins/vsprintf-3.c.exp @@ -1,2 +1 @@ - In function `test_vsprintf': - warning: vsprintf() is often misused, please use vsnprintf() +: warning: vsprintf() is often misused, please use vsnprintf() -- 2.20.1