diff --git a/cfg/posix.cfg b/cfg/posix.cfg index e0de433e1f1..7645ad89fa9 100644 --- a/cfg/posix.cfg +++ b/cfg/posix.cfg @@ -4638,7 +4638,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s - + @@ -4658,7 +4658,6 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s - diff --git a/test/cfg/posix.c b/test/cfg/posix.c index 82cfd950792..54a583d39c9 100644 --- a/test/cfg/posix.c +++ b/test/cfg/posix.c @@ -1524,9 +1524,11 @@ void pthread_cond_timedwait_test(pthread_cond_t *cond, pthread_mutex_t *mutex, c void pthread_cond_init_test(pthread_cond_t *cond, const pthread_condattr_t *attr) { - // cppcheck-suppress nullPointer (void)pthread_cond_init(cond, NULL); (void)pthread_cond_init(cond, attr); + const pthread_condattr_t *uattr; + // cppcheck-suppress uninitvar + (void)pthread_cond_init(cond, uattr); } void pthread_cond_destroy_test(const pthread_cond_t *cond) @@ -1540,6 +1542,12 @@ void pthread_cleanup_push_test(void (*routine)(void *), void *arg) pthread_cleanup_pop(0); } +void pthread_cleanup_push_test_NULL(void (*routine)(void *)) +{ + pthread_cleanup_push(routine, NULL); + pthread_cleanup_pop(0); +} + void pthread_mutexattr_init_test(pthread_mutexattr_t *attr) { (void)pthread_mutexattr_init(attr); @@ -1606,4 +1614,4 @@ void pthread_define_test() (void)rwlock; PTHREAD_SCOPE_PROCESS; PTHREAD_SCOPE_SYSTEM; -} \ No newline at end of file +}