Skip to content

Commit 5cd2e17

Browse files
Christopher Friedtcfriedt
authored andcommitted
posix: pthread: fix warning about uninitialized variable
Initialize the variable to zero. I don't think there is any way out of this function without it being initialized, so IMHO it's a false positive. Signed-off-by: Christopher Friedt <[email protected]>
1 parent c2dc103 commit 5cd2e17

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/posix/pthread.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ int pthread_create(pthread_t *th, const pthread_attr_t *_attr, void *(*threadrou
468468

469469
int pthread_getconcurrency(void)
470470
{
471-
int ret;
471+
int ret = 0;
472472

473473
K_SPINLOCK(&pthread_pool_lock) {
474474
ret = pthread_concurrency;

0 commit comments

Comments
 (0)