Skip to content

Commit f7af032

Browse files
Update posix.c
1 parent a31118b commit f7af032

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

‎test/cfg/posix.c‎

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1524,9 +1524,11 @@ void pthread_cond_timedwait_test(pthread_cond_t *cond, pthread_mutex_t *mutex, c
15241524

15251525
void pthread_cond_init_test(pthread_cond_t *cond, const pthread_condattr_t *attr)
15261526
{
1527-
// cppcheck-suppress nullPointer
15281527
(void)pthread_cond_init(cond, NULL);
15291528
(void)pthread_cond_init(cond, attr);
1529+
pthread_cond_t *condu;
1530+
// cppcheck-suppress uninitvar
1531+
(void)pthread_cond_init(condu, attr);
15301532
}
15311533

15321534
void pthread_cond_destroy_test(const pthread_cond_t *cond)
@@ -1540,6 +1542,12 @@ void pthread_cleanup_push_test(void (*routine)(void *), void *arg)
15401542
pthread_cleanup_pop(0);
15411543
}
15421544

1545+
void pthread_cleanup_push_test_NULL(void (*routine)(void *))
1546+
{
1547+
pthread_cleanup_push(routine, NULL);
1548+
pthread_cleanup_pop(0);
1549+
}
1550+
15431551
void pthread_mutexattr_init_test(pthread_mutexattr_t *attr)
15441552
{
15451553
(void)pthread_mutexattr_init(attr);
@@ -1606,4 +1614,4 @@ void pthread_define_test()
16061614
(void)rwlock;
16071615
PTHREAD_SCOPE_PROCESS;
16081616
PTHREAD_SCOPE_SYSTEM;
1609-
}
1617+
}

0 commit comments

Comments
 (0)