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/05/09 15:28:59 UTC

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

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


##########
sched/pthread/pthread_mutexinit.c:
##########
@@ -68,11 +68,9 @@ int pthread_mutex_init(FAR pthread_mutex_t *mutex,
 #  endif
 #endif
 #ifndef CONFIG_PTHREAD_MUTEX_UNSAFE
-#ifdef CONFIG_PTHREAD_MUTEX_DEFAULT_UNSAFE
-  uint8_t robust = PTHREAD_MUTEX_STALLED;
-#else
-  uint8_t robust = PTHREAD_MUTEX_ROBUST;
-#endif
+#  ifdef CONFIG_PTHREAD_MUTEX_BOTH
+  uint8_t robust;

Review Comment:
   @zhuyanlinzyl let fix the warning by initializing robust to _PTHREAD_MFLAGS_ROBUST



-- 
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