diff options
author | Anil Madhavapeddy <avsm@cvs.openbsd.org> | 2003-09-05 20:50:30 +0000 |
---|---|---|
committer | Anil Madhavapeddy <avsm@cvs.openbsd.org> | 2003-09-05 20:50:30 +0000 |
commit | 31c65370e0c9692e9973f8e50f20cd9847a8a2e4 (patch) | |
tree | c427dc065b0641d56dc2726077c71ceea94fb37d | |
parent | 6c4a6354e5979a32f58660e2c88b48627a307a46 (diff) |
no longer warn on '0' bound size, add new test for the negative case
-rw-r--r-- | regress/gnu/egcs/gcc-bounds/Makefile | 4 | ||||
-rw-r--r-- | regress/gnu/egcs/gcc-bounds/strlcat-3.c.exp | 2 | ||||
-rw-r--r-- | regress/gnu/egcs/gcc-bounds/strlcat-6.c | 8 | ||||
-rw-r--r-- | regress/gnu/egcs/gcc-bounds/strlcat-6.c.exp | 2 |
4 files changed, 12 insertions, 4 deletions
diff --git a/regress/gnu/egcs/gcc-bounds/Makefile b/regress/gnu/egcs/gcc-bounds/Makefile index 3448d16de75..1ad2154c22c 100644 --- a/regress/gnu/egcs/gcc-bounds/Makefile +++ b/regress/gnu/egcs/gcc-bounds/Makefile @@ -1,10 +1,10 @@ -# $OpenBSD: Makefile,v 1.2 2003/08/06 13:54:30 avsm Exp $ +# $OpenBSD: Makefile,v 1.3 2003/09/05 20:50:29 avsm Exp $ C_MODULES?= strlcpy strlcat getcwd memcpy fread memcpy declare sscanf vararray CPP_MODULES?= snprintf sscanf C_STRLCPY= 1 2 3 4 5 6 -C_STRLCAT= 1 2 3 4 5 +C_STRLCAT= 1 2 3 4 5 6 C_GETCWD= 1 2 3 4 C_MEMCPY= 1 2 3 4 5 6 C_FREAD= 1 2 3 4 diff --git a/regress/gnu/egcs/gcc-bounds/strlcat-3.c.exp b/regress/gnu/egcs/gcc-bounds/strlcat-3.c.exp index 9a20628e8da..e69de29bb2d 100644 --- a/regress/gnu/egcs/gcc-bounds/strlcat-3.c.exp +++ b/regress/gnu/egcs/gcc-bounds/strlcat-3.c.exp @@ -1,2 +0,0 @@ -strlcat-3.c: In function `main': -strlcat-3.c:6: warning: non-positive bounds length (0) detected diff --git a/regress/gnu/egcs/gcc-bounds/strlcat-6.c b/regress/gnu/egcs/gcc-bounds/strlcat-6.c new file mode 100644 index 00000000000..1f13d46cf8d --- /dev/null +++ b/regress/gnu/egcs/gcc-bounds/strlcat-6.c @@ -0,0 +1,8 @@ +#include <stdio.h> +#include <string.h> + +int main(int argc, char **argv) { + char buf[10]; + strlcat(buf, "foo", -1); + return 1; +} diff --git a/regress/gnu/egcs/gcc-bounds/strlcat-6.c.exp b/regress/gnu/egcs/gcc-bounds/strlcat-6.c.exp new file mode 100644 index 00000000000..64aaff0c03f --- /dev/null +++ b/regress/gnu/egcs/gcc-bounds/strlcat-6.c.exp @@ -0,0 +1,2 @@ +strlcat-6.c: In function `main': +strlcat-6.c:6: warning: non-positive bounds length (-1) detected |