[PATCH] cobalt/synch: uapi: silence pedantic warning (signed/unsigned)

Philippe Gerum rpm at xenomai.org
Fri Dec 4 16:07:35 CET 2020


From: Philippe Gerum <rpm at xenomai.org>

Signed-off-by: Philippe Gerum <rpm at xenomai.org>
---
 include/cobalt/uapi/kernel/synch.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/cobalt/uapi/kernel/synch.h b/include/cobalt/uapi/kernel/synch.h
index 33d7ab3c7..a21eb965e 100644
--- a/include/cobalt/uapi/kernel/synch.h
+++ b/include/cobalt/uapi/kernel/synch.h
@@ -71,7 +71,7 @@ int xnsynch_fast_acquire(atomic_t *fastlock, xnhandle_t new_ownerh)
 static inline
 int xnsynch_fast_release(atomic_t *fastlock, xnhandle_t cur_ownerh)
 {
-	return atomic_cmpxchg(fastlock, cur_ownerh, XN_NO_HANDLE)
+	return (xnhandle_t)atomic_cmpxchg(fastlock, cur_ownerh, XN_NO_HANDLE)
 		== cur_ownerh;
 }
 
-- 
2.26.2




More information about the Xenomai mailing list