You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/04/29 02:40:56 UTC

[GitHub] [incubator-nuttx] zhuyanlinzyl commented on a diff in pull request #6173: nuttx: fix coverity check error

zhuyanlinzyl commented on code in PR #6173:
URL: https://github.com/apache/incubator-nuttx/pull/6173#discussion_r861428451


##########
sched/pthread/pthread_mutexinit.c:
##########
@@ -124,11 +117,20 @@ int pthread_mutex_init(FAR pthread_mutex_t *mutex,
 #endif
 
 #ifndef CONFIG_PTHREAD_MUTEX_UNSAFE
-      /* Initial internal fields of the mutex */
 
       mutex->flink  = NULL;
+
+#ifdef CONFIG_PTHREAD_MUTEX_BOTH
+      /* Initial internal fields of the mutex */
+
       mutex->flags  = (robust == PTHREAD_MUTEX_ROBUST ?

Review Comment:
   Yes, I add uint8_t robust when CONFIG_PTHREAD_MUTEX_BOTH is enable.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org