Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions cfg/posix.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4638,7 +4638,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<not-null/>
</arg>
<arg nr="2" direction="in">
<not-null/>
<not-uninit/>
</arg>
</function>
<function name="pthread_cond_destroy">
Expand All @@ -4658,7 +4658,6 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<not-uninit/>
</arg>
<arg nr="2">
<not-null/>
<not-uninit/>
</arg>
</function>
Expand Down
12 changes: 10 additions & 2 deletions test/cfg/posix.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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);
Expand Down Expand Up @@ -1606,4 +1614,4 @@ void pthread_define_test()
(void)rwlock;
PTHREAD_SCOPE_PROCESS;
PTHREAD_SCOPE_SYSTEM;
}
}
Loading