From 6d9eb6199d1be66daa8b493f890b10790aba0136 Mon Sep 17 00:00:00 2001 From: Alexander Mai Date: Fri, 20 Feb 2015 20:50:20 +0100 Subject: [PATCH] posix.cfg: add support for sched.h and 1 bugfix --- cfg/posix.cfg | 72 +++++++++++++++++++++++++++++++++++++++++++++++- test/cfg/posix.c | 16 ++++++++++- 2 files changed, 86 insertions(+), 2 deletions(-) diff --git a/cfg/posix.cfg b/cfg/posix.cfg index e5f8514af..b3379db39 100644 --- a/cfg/posix.cfg +++ b/cfg/posix.cfg @@ -739,6 +739,7 @@ + @@ -789,7 +790,6 @@ false - @@ -845,4 +845,74 @@ + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + false + diff --git a/test/cfg/posix.c b/test/cfg/posix.c index 950a5363f..0c901fe10 100644 --- a/test/cfg/posix.c +++ b/test/cfg/posix.c @@ -13,7 +13,7 @@ #include #include #include - +#include void bufferAccessOutOfBounds(int fd) { char a[5]; @@ -124,6 +124,20 @@ void uninitvar(int fd) { write(fd,buf,2); // cppcheck-suppress uninitvar write(fd,"ab",x); + + + /* int regcomp(regex_t *restrict preg, const char *restrict pattern, int cflags); */ + regex_t reg; + const char * pattern; + int cflags; + // cppcheck-suppress uninitvar + regcomp(®, pattern, cflags); + pattern=""; + // cppcheck-suppress uninitvar + regcomp(®, pattern, cflags); + cflags=42; + // cppcheck-suppress uninitvar + regcomp(®, pattern, cflags); } void uninitvar_types(void) {